java.sql.SQLException: Exhausted Resultset
I've seen this error while trying to access a column value after processing the resultset.
if (rs != null) {
while (rs.next()) {
count = rs.getInt(1);
}
count = rs.getInt(1); //this will throw Exhausted resultset
}
Hope this will help you :)
java.sql.SQLException: Exhausted Resultset error
Try as
if (rs! = null) {
while (rs.next()) {
returnValue = rs.getString("display_name");
}
......
SQLException: Exhausted Resultset
result.next();
storedPassword = result.getString("passwd");
You are not checking the return value of next. If you have no rows you get into trouble...
if(result.next()){
storedPassword = result.getString("passwd");
}
Getting Exausted ResultSet Error in Java jdbc oracle
UnCOMMIT
ted data is only visible within the session that created it (and will ROLLBACK
at the end of the session if it has not been COMMIT
ted). If you can't see the data then make sure you have issued a COMMIT
command in the SQL client.
If you have issued a COMMIT
and still can't see the data then make sure that both the SQL Client and the JDBC program are connecting to the same database and are querying the same user's schema of that database.
Related Topics
Bigdecimal Equals() Versus Compareto()
How to Format a String in an Email So Outlook Will Print the Line Breaks
Removing Invalid Xml Characters from a String in Java
How to Lower Java Heap When Not in Use
How to Use Printwriter and File Classes in Java
Entry Point for Java Applications: Main(), Init(), or Run()
How to Use Audio Sample Data from Java Sound
How to Set Dpi Information in an Image
Do Hibernate Table Classes Need to Be Serializable
Where Are Compiled Jsp Java (*_Jsp.Java) Files
Replace All Occurrences of a String Using Stringbuilder
Spring Autowiring Using @Configurable
Java Jtextfield with Input Hint
How to Force Browser to Download File