SQL exception, Exhausted ResultSet



Share on Google+Share on Google+

SQL exception, Exhausted ResultSet
2 Answer(s)      4 years and 6 months ago
Posted in : JDBC

javax.servlet.ServletException: java.sql.SQLException: Exhausted Resultset

iam getting this error messege whenever i run my code. what would be the possible reasons??

View Answers

May 9, 2013 at 10:19 PM

how can i destroy a resultset object explicitly?

May 22, 2013 at 1:27 PM

hi friend,

java.sql.SQLException: Exhausted ResultSet exception may be thrown when you would be tried to access the column value after processing the ResultSet i.e. the result set is closed. For example if you tried to access the column value like the code given below then this exception may be thrown.

ps = con.prepareStatement(sql);
rs = ps.executeQuery();         
    name = rs.getString(1);
  name = rs.getString(2);



Related Tutorials/Questions & Answers:
SQL exception, Exhausted ResultSet
SQL exception, Exhausted ResultSet  javax.servlet.ServletException: java.sql.SQLException: Exhausted Resultset iam getting this error messege whenever i run my code. what would be the possible reasons
Resultset Issue in SQL
Resultset Issue in SQL  when i call rs.next() in my code it is returning false, though im having valid query to execute and fetch a row from database.how can i resolve this issue. My code is: SELECT JOBDESCRIPTION,CATEGORY
large resultset values - SQL
large resultset values  i have one query which will bring more than one lakh records from database(total records are abt 3 crores). While getting the details i'm getting error like
SQL Exception
SQL Exception  I want stores data in to the databse table but it can't be stores it shows an error about sql exception. blackberry.html <...(Exception e) { out.println("Failed to success
Java sql Exception
Java sql Exception  difference between sql exception class and sql warning class
Executing anonymous pl/sql block and get resultset in Java
Executing anonymous pl/sql block and get resultset in Java  Hello All, I would like to execute the anonymous pl sql block and need to get the resultset object. I got the code which can be done by using cursors inside the pl sql
sql exception - JSP-Servlet
sql exception  Dear sir , I am working in a web-based project, In my system it is working fine but at client side getting the following exception so how to resolve this help me... java.sql.SQLException: ORA-28231
ResultSet   What is a ResultSet
jdbc sql exception.
jdbc sql exception.  import java.sql.*; import java.io.*; class InsertEx { public static void main(String args[])throws Exception { Class.forName... Employee salary 9000 Enter Employee address hyd Exception in thread "main
ResultSet  What is a ResultSet
Enhanced SQL Exception Handling
Enhanced SQL Exception Handling       5. Enhanced SQL Exception Handling: A lot of improvement has been done regarding Exception handling in the following fields: Iterable SQL Exception
database.how to do it using resultset or Resultsetmetadata.Can you please tell me what... = con.createStatement(); ResultSet rs = st.executeQuery...----------------------); } } catch (Exception e
jdbc odbc sql server exception
jdbc odbc sql server exception  Hi, I am trying to use sql server with java jdbc odbc but I am getting this exception java.sql.SQLException: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near '@P1
This Query is no working in sql developer it is giving Ora-0933 exception SQL command not properly ended exception
This Query is no working in sql developer it is giving Ora-0933 exception SQL command not properly ended exception  SELECT * from employees ORDER BY first_name limit 0,10;   Hi Friend, Please clarify your problem
multiple resultset in one resultset
multiple resultset in one resultset  how to retrive multiple resultsets in one resultset in java.? plz help
Get Column Count using ResultSet in SQL
Get Column Count using ResultSet in SQL   ... of columns in a ResultSet. The ResultSetMetaData object can be obtained by invoking getMetaData() method on ResultSet object. In this program you will see how JDBC
resultset metadta
resultset metadta  import java.sql.Connection; import... Employee Details Using resultset metadata: "); Connection con = null...(); ResultSet rs = st.executeQuery("SELECT * FROM employee
exception  Identify the reason for SQLException exception, which... (?,?)"; PreparedStatement ps = con.prepareStatement(str); ResultSet rs=ps.createResultset..."); ps.executeUpdate(); } catch(Exception e
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception
arguments are not equalto two,throw a user defined exception "invalid parameter exception" ,otherwise display the two parameters.   Here is an example... is not equal to two then invalid parameter exception is thrown ,otherwise display the two
JTable populate with resultset.
(); ResultSet resultSet = statement.executeQuery(sql...JTable populate with resultset.  How to diplay data of resultset...) JTable(Vector data, Vector columneNames) Here is a JTable populate with resultset
exception  what is the use of catch block even though we have predefined exception object
exception  example for numberformat exception   Hi Friend, Try the following code: class NumberFormatExceptionEx{ public static void...); } catch(Exception e){ System.out.println(e
defined checked exception ââ?¬Å?InvalidCharcterFoundExceptionââ?¬Â? and creater a block of codes that will handle the exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int.... ex.printStackTrace(); System.exit(1); } catch(Exception ex
Exception   I was creating a table dynamically but it shows exception i.e shown down Suplier created0 Suplier created0 Suplier created0 Product created0 Product created0 Product created0 Product created0 could not fetch initial
user defined unchecked exception  can we create user defined unchecked exceptions? if so what is the exact use of it in real time?   Please visit the following links: http://www.roseindia.net/java/java-exception/user
resultset problem - JSP-Servlet
resultset problem  hi I have one problem with resultset? ResultSet rs=st.execute("select subjname,staffname from staffdetails"); while... is java.sql.SQLException: Operation not allowed after ResultSet closed how
Update a resultset programmatically
Update a resultset programmatically  How to update a resultset programmatically


Advertisement null