wood burning stoves 2.0*
The moose likes JDBC and the fly likes SQL Exception: Cursor state not valid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Exception: Cursor state not valid" Watch "SQL Exception: Cursor state not valid" New topic
Author

SQL Exception: Cursor state not valid

Dominic Steng�rd
Ranch Hand

Joined: Feb 05, 2001
Posts: 186
Hey fellow javacoders!

Im running JDBC on top of a DB2 database.
When I run the following code:



I get the following error when rs.beforeFirst() is executed:


Have you guys got any thoughts on why this is happening and how to solve it?
Thanks in advance!

Kind regards
[ March 08, 2008: Message edited by: Dominic Steng�rd ]

Dominic Steng�rd<br />Sun Certified Java 2 Programmer
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi Dominic,



Check DB2's documentation if it supports this at all.
Lookign at your code, I think you don't need this line anyway.

Herman
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SQL Exception: Cursor state not valid
 
Similar Threads
org.springframework.jdbc.UncategorizedSQLException
a easy question please help !!!
Invalid cursor state exception
JDBC using ResourceBundle Class Problem
Problem getting the number of rows in a ResultSet