File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
Don't get me started about those stupid light bulbs.
 
subject: SQL Exception: Cursor state not valid