The moose likes JSP and the fly likes error invalid cursor state Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "error invalid cursor state" Watch "error invalid cursor state" New topic
Author

error invalid cursor state

Ashwini Iyer
Greenhorn

Joined: Feb 24, 2003
Posts: 1
I am getting this error in servlets i have to extract just one field tha's all rs.getString("name") also i have closed all result set and statements what problem is it i am connecting to mssql.
reply to ashs_a@indiatimes.com
Please reply soon thanks in advance
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
This probably belongs in the JDBC forum, but I'll answer quick anyway. Before calling rs.getString(), make sure you do an rs.next() to advance to the first row of data.


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
 
IntelliJ Java IDE
 
subject: error invalid cursor state
 
Threads others viewed
Unable to look up JNDI name for JMS connection factory from one weblogic server to o
Importing a package
Java Code is throwing NoSuchField Error
how i vaidate form field in struts with validation .xml
Please Help me Ranchers
MyEclipse, The Clear Choice