Hi Robert,
when you retrieve data from a db using jdbc, the cursor cannot move
backwards. If u want that fuctionality, use JDBC2.0 API instead with some
compliant driver.
You might have put the query in a loop where the cursor reaches the end of
the table in the first go itself and thus it fails when you query the second
time.
Hope this helps.
cheers
Yogesh Agarwal
Software Engineer
IMRGlobal Corp.
#22, SEEPZ, Andheri(E),
Mumbai - 400 096
Phone : 91-22-8291421 Ext 151
Mail to : [EMAIL PROTECTED]
-----Original Message-----
From: Robert Chung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, July 01, 1999 6:07 AM
Subject: servlet-sql Q
>Hi, all
>
>In my servlet, I have some PreparedStatement, which talk to the database.
>When I query first time, it works fine, but when I query second time, I get
>"Invalid Cursor State" error. Is it a bug?
>
>I close resultset and statement whenever query is done. getCursorName()
does
>not seem to work, either.
>
>Does anybody know what is wrong? Thanks
>
>Cheers,
>
>Robert Chung
>Vertica Software, Inc.
>[EMAIL PROTECTED]
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html