Here is my code
cstmt.setObject(i++, ratingTypeId, OracleTypes.NUMBER);
rs = (ResultSet)cstmt.getObject(3); // Here i am getting classcast exception
Thanks in advance.
Joined: Oct 13, 2005
What is the value of i?
Try printing out the Object returned from no 3; that is obviously not a ResultSet or similar.
The normal way to get a ResultSet from a query like that is to use CallableStatement.getResultSet(), which returns... a ResultSet! That may or may not work in this particular case, but it's more likely to work than your code is.
Joined: Sep 23, 2002
But same code in working in server, But in my local environment its not working