Hey guys
Just wondering if
java developers have decided kindly to offer a method that checks if resultSet is empty or not!!?
I searched in this forum and others for this problem, but unfortunately almost all replies tells the OP to use rs.next() and this method although will return false if the resultset is empty BUT it will move the curser down one record!
Another solution that was suggested is using rs.wasNull, and you have to get the record before you can check whether it was null or not!
Furthermore, it was suggested that you place a counter within
while(re.next())
and then check whether the counter is 0. Unfortunately this doesn't apply in my case, because I need to add a text to my document (that shall be displayed in TextArea) before I can loop through the records in the resultSet and add them to this document....
So I need to check if the resultSet is empty before I can proceed in adding values to the document!
any help greatly appreciated
thanks
HannaH
[ January 29, 2006: Message edited by: H Melua ]