Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL Exception: Cursor state not valid

 
Dominic Steng�rd
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!