Hi, the result pointer is pointing to "after last record " after executing the while(rs.next()). But you are calling the idpeg = rs.getString(1) after while loop. There is no record in result set at...