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

Posted By:   Mandar_Pohnerkar
Posted On:   Monday, August 5, 2002 11:06 PM

Hello,I know i m posting this question is a wrong forum ,coz i did not get any reply from jdbc forum. 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 -orwarding to 2nd jsp page. There i have 2 frames and one 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 tha   More>>

			
Hello,I know i m posting this question is a wrong forum ,coz i did not get any reply from jdbc forum.

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 -orwarding to 2nd jsp page.
There i have 2 frames and one 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?



   <<Less

Re: invalid cursor state

Posted By:   rishi_mohta  
Posted On:   Tuesday, August 6, 2002 01:27 AM

rs=stmt.executeQuery("select * from abc");

rs.next(); //you have missed this line

int a= rs.getInt(1);//
About | Sitemap | Contact