aspose file tools*
The moose likes JDBC and the fly likes rs.next() returning false for second row.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rs.next() returning false for second row.." Watch "rs.next() returning false for second row.." New topic
Author

rs.next() returning false for second row..

Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
Hi
I am using jdk1.4 SQL200 to retrive data from miltiple tables..
I have following code..
I get problem in rsForQuery2.next() ie for second dynamic query it shows rsForQuery2.next() is false so its unable to enter while ..
what can be the problem?
Ajit


Thankx
Ajit
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

most likely, your query returns no matches. Did you check your query ( cut and pasted for your System.out.println() ) in your SQL editor to verify that indeed the query returns results?
Jamie
Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
Hi
Yes u are correct .
Its because i had only one row..
Thanx for the reply
Ajit
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: rs.next() returning false for second row..