hi pls help

M

mamta81

String query="select status from menu_logs where menu='Initialisation
Of the month'";
ResultSet rs=stmt.executeQuery(query);

menu_logs:
MENU
VARCHAR2(50)
SEQ
NUMBER(3)
STATUS VARCHAR2(5)
I AM GETTING THE FOLLOWING ERRORS---------------------------------->
java.sql.SQLException: Exhausted Resultset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at
oracle.jdbc.driver.ScrollableResultSet.getOracleObject(ScrollableResultSet.java:
655)
at
oracle.jdbc.driver.ScrollableResultSet.getString(ScrollableResultSet.java:
680)
at
oracle.jdbc.driver.UpdatableResultSet.getString(UpdatableResultSet.java:
359)
at com.tiis.payroll.forms.PayRoll.menuEvent(PayRoll.java:278)
at com.tiis.payroll.forms.PayRoll$1.actionPerformed(PayRoll.java:112)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:
1849)
at javax.swing.AbstractButton
$Handler.actionPerformed(AbstractButton.java:2169)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:
420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:
258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:
1000)
at javax.swing.plaf.basic.BasicMenuItemUI
$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:
4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:
3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
 
S

send2r

make sure that you :
* had data in the table
* have called resultSet.next() before accessing fields from the result
set.
* are NOT calling resultSet.getString(...) after closing your
resultSet
* are closing resultSets in your finally block.

Note that your exception is thrown at the stage while you perofm a:
oracle.jdbc.driver.UpdatableResultSet.getString(..) NOT while
stmt.executeQuery

Always pay attention to stack trace, there is something useful in it.
 
G

GArlington

make sure that you :
* had data in the table
* have called resultSet.next() before accessing fields from the result
set.

checked the return value from next()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top