Results 1 to 2 of 2
  1. #1
    JonJacobs is offline Member
    Join Date
    Jul 2010
    Posts
    34
    Rep Power
    0

    Default Access Database, Invalid Handle

    My SE app reads data from various databases, including Access with no problem. However, this one query that would get 34 columns and 2600 rows gives me the following:
    Exception in thread "main" java.sql.SQLException: Invalid handle
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java :7129)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java :3110)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcSt atement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcO dbcStatement.java:253)
    at myconnect.GetData.ClientFile(GetData.java:390)
    at myconnect.Main.main(Main.java:56)

    Again, other queries against the same database give me no problems. Also that particular query, when pasted into another app I wrote in C# works fine (thats how I know how many rows it returns)

    So, why can't I run this query in my Java app?

    Thanks,
    Jon Jacobs
    This message was composed entirely from recycled electrons.

  2. #2
    JonJacobs is offline Member
    Join Date
    Jul 2010
    Posts
    34
    Rep Power
    0

    Default

    I found the problem. I had closed the statement object after a previous query.
    Jon Jacobs
    This message was composed entirely from recycled electrons.

Similar Threads

  1. RCU in Java? or some list/set/etc. which can handle concurrent access?
    By flok in forum Threads and Synchronization
    Replies: 1
    Last Post: 09-14-2009, 11:59 PM
  2. Replies: 2
    Last Post: 08-14-2009, 11:16 AM
  3. Replies: 1
    Last Post: 03-24-2009, 01:52 PM
  4. Replies: 2
    Last Post: 02-11-2009, 05:43 AM
  5. Invalid Thread Access?
    By xcallmejudasx in forum Advanced Java
    Replies: 1
    Last Post: 10-30-2008, 11:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •