I’m using resultSet.next() to check whether a unique row exist in the database or not. But it is returning false even when the row exists in the database.
Can anyone explain the first comment of the first answer of this page?.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If there is any row in the database which you are expecting, then first call to resultSet.next() should return true.
Answer on this page.
If you are expecting only one row to be returned from database then first call to resultSet.next() will return true and any furter call will return false. First next() call on resultSet takes cursor to the first row.