This content has been marked as final. Show 5 replies
If your query returns zero rows, you'll get that. You need to check the return
value for your ResultSet.next() call. If it's false, you can't call getString()...
actually it has the record. when i ran the same query from oracle DB, i could get the single record. can you please see, if there is anything wrong or can add any extra thing to get the record from DB?
Just do what I said. Tell me if the next() call returns true or false. That will be your answer.
it returned false. my question why it returned false, if it actually has the record? i am not able to understand how do i able get that record?
QED. You may say the DBMS has the record, but the result set clearly
doesn't. Are you absolutely sure you are logging in to the exact same
DBMS as the exact same user when you run that query in SQL-PLUS
and see a row, and when you connect via JDBC and run the same