R
Rizwan
whenever I try to read a column's value of a resultset twice, java gives me
an error message :
java.sql.SQLException: Invalid Descriptor Index
In my program, I have to read some column's values more than once. Is there
any way I can do that?
Thanks
// cx is the Connection object
Statement stmt = cx.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY );
String query = "SELECT company_id, batch_id FROM timecard";
ResultSet rs = stmt.executeQuery( query );
String compVal = "";
rs.next();
compVal = rs.getString( "company_id" );
....
readWholeRecord (ResultSet rs);
public void readWholeRecord( ResultSet rs ){
String compV = rs.getString( "company_id" );
...
}
an error message :
java.sql.SQLException: Invalid Descriptor Index
In my program, I have to read some column's values more than once. Is there
any way I can do that?
Thanks
// cx is the Connection object
Statement stmt = cx.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY );
String query = "SELECT company_id, batch_id FROM timecard";
ResultSet rs = stmt.executeQuery( query );
String compVal = "";
rs.next();
compVal = rs.getString( "company_id" );
....
readWholeRecord (ResultSet rs);
public void readWholeRecord( ResultSet rs ){
String compV = rs.getString( "company_id" );
...
}