I want to be able to get check to see if there is a result in my resultset. Todo this i would execute:
if(rs.next()){
boolean = true;
}
However i want to check to see if the value is in the database if so retrieve it:
while(rs.next())
id = rs.getInt("id);
How would i go about combining the two? I want -2 to be returned if the resultset is empty.
Thanks in Advance,
Dean