Velocity Reviews

Velocity Reviews (
-   Java (
-   -   Error :"Invalid Cursor State" (

dhavalthakor28691 06-29-2011 07:59 AM

Error :"Invalid Cursor State"
M getting error Invalid cursor state
here is my code.
i can able to store data in this part i m getting error..
im nt able get value of usercount column
plz help me
thnx in advance

//additionalInfo table has two colm 1>userCountId2>userCount
public class TestConnection
public static Connection con=null;

public static void main(String args[])
con = DriverManager.getConnection("jdbc:odbc:sqlserver") ;
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIV E,ResultSet.CONCUR_UPDATABLE);
String str = "select * from additionalInfo where userCountId=1";
ResultSet rs = stmt.executeQuery(str);
int count = rs.getInt("userCount");
boolean b= true;
//int count =rs.getInt(1);

}catch(Exception e)
//System.out.println(e.getMessage()+e.printStackTrac e());

All times are GMT. The time now is 12:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.