--- Carlos <[EMAIL PROTECTED]> wrote:
> On Nov 14, 6:44 pm, Joe Wilson <[EMAIL PROTECTED]> wrote:
> > >   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)
> 
> surely that's the same thing, as stmt.executeQuery(sql).getMetadata()
> will return an instance of MetaData... which is what I already have.
> My table model only gets the metadata, rather than the sql.  I could
> modify it, but I am sure the result would be the same.

It works for me. I have no idea what your program is doing.

The odds of getting your issued resolved are greater if you
post a small standalone JDBC-only program with no external 
libraries or dependencies that reproduces the problem.

> The error happens when the "Inconsistent Internal State" error happens
> when the getColumnType function is called.

That was already apparent in your initial report.



      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

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

Reply via email to