>   I have just started using SQLiteJDBC, and I am trying to display
> some data in a JTable using a table model that I had used before for
> some DB2 and MySQL applications.  When executing the code, I get the
> following error:
> 
> java -cp .;sqlitejdbc-v037-nested.jar PasswordTool
> Exception in thread "AWT-EventQueue-0"
> java.lang.IllegalStateException: SQLite JDBC: inconsistent internal
> state
>         at org.sqlite.RS.checkCol(RS.java:74)
>         at org.sqlite.RS.getColumnType(RS.java:294)
>         at DBTableModel.getColumnClass(DBTableModel.java:116)
>         .................
> 
> The getColumnClass method in my application basically maps the SQL
> types with Java types for the model. The code looks like this:
> 
> int type;
> try {
>    type = metaData.getColumnType(column+1);
> } catch (SQLException e) {
>    return super.getColumnClass(column);
> }

these ought to work:

  stmt.executeQuery(sql).getMetaData().getColumnType(int)

or

  prepstmt.executeQuery().getMetaData().getColumnType(int)



      
____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to