When a resultset is returned, the cursor is positioned before the first record. next() returns true if the next record was retrieved sucessfully. If the recordset is empty, your first call to next() will return false. next() only throws an exception if there is a database error, and an empty result set IS NOT a database error.
Perhaps, you are getting an exception because your result set variable is null or does not point to a resultset object?
Cheers, [ October 06, 2005: Message edited by: Tom Blough ]
Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>