I am trying to insert the data using JDBC 2.0 with Resultset
update
methods with Type 1 Driver. But I am checking in the table, it inserted data as ASCII values. I mention the code below:
try {
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs=stmt.executeQuery("select ENO,ENAME,EADD from Employee");
String name="saikiran";
rs.moveToInsertRow();
rs.updateString("ENO","3");
rs.updateString("ENAME",name.toString());
rs.updateString("EADD","CSE");
rs.insertRow();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
If the same code is run using Type 4 Driver, its working fine. What's the problem with Type I Driver using ResultSet
update
methods?