[Oracle] How to check for empty ResultSet?

From: Kevin C. (nomail_at_fake.com)
Date: 03/13/04


Date: Sat, 13 Mar 2004 13:49:50 GMT

I am trying to use

while (rs.next())
{...}

but there is one hitch -- it seems that Oracle doesn't want to return false,
instead it throws an SQLException with message "Exhausted Resultset" if the
ResultSet is empty. Same goes for isBeforeFirst() and isAfterLast(). I am
currently using the java.sql interfaces because I don't want to get into the
oracle.jdbc.driver classes, and I'm not sure if that would help anyway. Is
there a solution to this? I am using Java 1.4 and Oracle 8i.



Relevant Pages