| Author |
I want to check if my ResultSet has records in it or it is empty?
|
Constantinos Grevenitis
Ranch Hand
Joined: Nov 29, 2006
Posts: 31
|
|
|
I thought that wasNull() was the one a I was wrong. Is there any method that checks that or do I have to do it "manually"?
|
 |
Masoud Kalali
Author
Ranch Hand
Joined: Jul 08, 2004
Posts: 531
|
|
Hi Constantinos, You can try rs.next() which return a boolean value indecating that whether ResultSet has any record or not. To explain more, When you execute a query and it return a resultset, resultset pointer is before first row, when you call resultSet.next() it trys to move to first rows and if the row is not present it will return false.
|
Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
|
 |
 |
|
|
subject: I want to check if my ResultSet has records in it or it is empty?
|
|
|