Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

statement.executeQuery() crashes query if no records found

  Asked By: Dale    Date: Aug 09    Category: Java    Views: 1935
  

I'm using JDBC to connect to a MS-Access database. I get ResultSets
returned from statement.executeQuery() statements Ok if there is at
least on row in the ResultSet. If no records are found, the query
crashes.

What am I doing wrong? How can I keep the query running, cycling
through other SQL statements?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Roosevelt Jenkins     Answered On: Aug 09

Where does the crash happen? If it's in your code, you're probably not
properly processing a returning exception. Remember, if an exception is
thrown, the ResultSet reference will be null, and any subsequesnt
operations on the result set will cause a crash.

 
Didn't find what you were looking for? Find more on statement.executeQuery() crashes query if no records found Or get search suggestion and latest updates.




Tagged: