The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Need more info, but here's some general pointers......

Posted by Jody Brown on November 15, 2000 at 12:59 PM

Ramesh,

I will need more details about what you are trying to do before
I can give any real advice. However........

I have had a look at the first() method and it throws an SQLException
if the resultset contains no rows. If an SQLException is being
thrown, do an exception.getMessage() to find out where it is
failing.

Another useful method is the next() method, which can be used to
traverse a ResultSet. Use it as follows:-

while(resultset.next()) {
doSomeProcessingOnTheCurrentRow();
}

The while loop will automatically move onto the next row in the
resultset with each iteration.

Hope this goes someway to sorting out your problem. If not,
post some more specific details, and I will have another look at it
for you.

Regards,

Jody



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us