jQuery in Action, 2nd edition*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
 
subject: rs.next() returning false for second row..
 
Similar Threads
Jdbc 2 Driver for DB2/UDB does not work
multiple processes... only want one
problem with scrollable resultset
Problem in ResultSet
RMI Exception! Please give me a hand!