|
-
Sep 2nd, 2001, 11:45 PM
#1
[Resolved] Invalid Cursor State error...
I posted this in the Database forum, but I feel that I might get a response here as well.
I am trying to get a ResultSet from a database, and I keep getting this SQLException..."Invaid Cursor State". Now, I know that several things could cause this, but what could those things be? I am using almost identical code on a different servlet, and am not getting any errors...
Code:
//...
Statement stmt = conn.createStatement() //connection created earlier in the code
ResultSet rs = stmt.executeQuery("SELECT * FROM Products WHERE ISBN='" + ISBN + '"); //exception is thrown here
//...
any thoughts?
Last edited by crptcblade; Sep 4th, 2001 at 11:47 PM.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Sep 4th, 2001, 03:52 PM
#2
Nobody? Help!!!
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Sep 4th, 2001, 11:07 PM
#3
Do you mean a runtime exception or a compile time error? I don't see a semicolon after the first statement.
Or maybe you need
ISBN='" + ISBN + "'");
with the tick mark between two quotes on the end.
ISBN= 1tick endQuote + ISBN + openQuote 1tick closeQuote);
-
Sep 4th, 2001, 11:46 PM
#4
I keep forgetting to update my threads. I fixed it, but I can't figure out why it didn't work. Oh, well, as long as it works now, I guess.
Thanks
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|