I was facing an error in storing the row count obtained from sql into a variable i displayed the one file running code below along with output. i was wondering if you guys could help me with this error. I want to count the no of customers and then append it to a
string and generate the customer id.
I want to get he count of customers from a table in oracle 11g db and store it in a variable. I am unable to do so. Please can anyone help me? I have shown the snippet of the code i am trying to write...
OUTPUT:
Connection Successfull
sun.jdbc.odbc.JdbcOdbcConnection@39b27b
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
at components.genrateid.generateid(genrateid.java:29)
at components.genrateid.main(genrateid.java:43)