I�m working with an Access bd and the driver "sun.jdbc.odbc.JdbcOdbcDriver" and when I try to insert a row using result.moveToInsertRow() gives an exception: java.lang.ArrayIndexOutOfBoundsException
I have not problems with others things of JDBC 2.0 API. I don't know if it's a problem of the access bd that doesn't let do that, how can I know if it's posible to use moveToInsertRow with Access. Thanks and Sorry, my English is very bad.
It may be helpful to post the offending code (the statement, and resultset lifespan). It may help shed a little more light on the problem. Jamie
leire_etxeberria
Greenhorn
Joined: Sep 05, 2001
Posts: 3
posted
0
This is the code Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc dbc:alumnos"); stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); result = stmt.executeQuery("select * from alumnos");
...
result.moveToInsertRow(); //Here it gives the exeption result.updateInt("IDAL",Integer.valueOf(txtIdal.getText()).intValue()); result.updateString("NOMBRE",txtNombre.getText() ); result.updateString("PRIMER_APELLIDO",txtApel1.getText() ); result.updateString("SEGUNDO_APELLIDO",txtApel2.getText() ); result.insertRow(); result.moveToCurrentRow(); ...
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.