connection.setAutoCommit(false); Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
int recordCount = 10; PreparedStatement ps = connection.prepareStatement( "INSERT INTO test_table(" + "id, long_str) VALUES (?, ?)");  try { for (int i = 0; i < recordCount; i++) { ps.setInt(1, i); ps.setString(2, "oldString" + i); ps.executeUpdate(); } } finally { ps.close(); }  connection.setAutoCommit(true); Statement stmt = connection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    public void testUpdatableResultSetMutipleStatements() throws Exception {        connection.setAutoCommit(false);        Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);                try {            ResultSet rs = stmt.executeQuery("SELECT * FROM test_table");                        Statement anotherStmt = stmt.getConnection().createStatement();            try {                ResultSet anotherRs = anotherStmt.executeQuery("SELECT * FROM rdb$database");            } finally {                anotherStmt.close();            }                        rs.moveToInsertRow();            rs.updateInt("id", 1);            rs.updateString("blob_str", "test");            rs.updateNull("str");            rs.insertRow();                        rs.close();        } finally {            stmt.close();        }        connection.setAutoCommit(true);    }