invalid cursor state
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mandar_Pohnerkar
Posted On:   Monday, August 5, 2002 05:11 AM

Hello, I m getting above error in jsp page. I have 3 jsp pages. IN the first page i m including a jsp page where the connection,statement objects r created.Thus on the first page i m retrieving and checking username and password and then in finally i m closing resultset,statement and connection object and then forwarding to 2nd jsp page. There i have 2 frames and on of the frame is trying to retrieve values from the database (again here also i have included jsp file which connects to the databse)by rs=stmt.executeQuery("select * from abc"); int a= rs.getInt(1);//so here i m getting error that invalid cursor state. Plz help me out. Also,the session variable created in th   More>>

			
Hello,
I m getting above error in jsp page.
I have 3 jsp pages.
IN the first page i m including a jsp page where the connection,statement objects r created.Thus on the first page i m retrieving and checking username and password and then in finally i m closing
resultset,statement and connection object and then forwarding to 2nd jsp page.
There i have 2 frames and on of the frame is trying to retrieve values from the database (again here also i have included jsp file which connects to the databse)by
rs=stmt.executeQuery("select * from abc");
int a= rs.getInt(1);//so here i m getting error that invalid cursor state.

Plz help me out.
Also,the session variable created in the first jsp pages is not accessible in the 3rd page where it gives the null value for that session varible ?why so?

Thanking you
Mandar

   <<Less

Re: invalid cursor state

Posted By:   Raj_K  
Posted On:   Tuesday, August 6, 2002 04:03 PM

use rs.next() before rs.getInt(1).

Thanks
About | Sitemap | Contact