aspose file tools*
The moose likes Beginning Java and the fly likes handle empty recordset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "handle empty recordset " Watch "handle empty recordset " New topic
Author

handle empty recordset

KunkalaGuntala Samba Siva Rao
Greenhorn

Joined: Nov 06, 2003
Posts: 20

before opening the popup, i am trying to say a user message if there are no records returned..
-----
1.
if (rs==null)
doesn't seems to catch a empty resultset returned)
2.
if rs.next()
is used it is skipping to display one record in the popup.
how to get around this , i am hoping i don't have to make an extra database call or use another type of cursor
Elouise Kivineva
Ranch Hand

Joined: Feb 07, 2002
Posts: 154
What class of object is rs ?
KunkalaGuntala Samba Siva Rao
Greenhorn

Joined: Nov 06, 2003
Posts: 20
Resultset rs;
just a resultset object
rs =...
Elouise Kivineva
Ranch Hand

Joined: Feb 07, 2002
Posts: 154
Well, I don't KNOW but since no one else is taking a shot at this...
I found this in the API for the ResultSet interface
"The number, types and properties of a ResultSet object's columns are provided by the ResulSetMetaData object returned by the ResultSet.getMetaData method."
And the ResulSetMetaData interface has a method getColumnCount().
I'd try that.
KunkalaGuntala Samba Siva Rao
Greenhorn

Joined: Nov 06, 2003
Posts: 20
yep, this is about the row and records returned.. thanks anyway.. )))
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: handle empty recordset