In my Servlet program, I have a method which get a Scrollable ResultSet. the code is as following:
try{ //try104
Statement stmt3 = conn2.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs3 = stmt3.executeQuery(sqlEvent);
rs3.last(); //move the cursor to the last row of the results
int num_row = rs3.getRow();
int p_death_ck = rs3.getInt("TYPE"
TYPE is one of the column in the Oracle table. It has varchar2 datatype in Oracle. The information in TYPE are all numbers (0 to 9). I used getInt() here and get an error message:
SQLException: Fail to convert to internal representation SQLState= null ErrorCode: 17059
Why can I do so?
try{ //try104
Statement stmt3 = conn2.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs3 = stmt3.executeQuery(sqlEvent);
rs3.last(); //move the cursor to the last row of the results
int num_row = rs3.getRow();
int p_death_ck = rs3.getInt("TYPE"
TYPE is one of the column in the Oracle table. It has varchar2 datatype in Oracle. The information in TYPE are all numbers (0 to 9). I used getInt() here and get an error message:
SQLException: Fail to convert to internal representation SQLState= null ErrorCode: 17059
Why can I do so?