hi,
sun's jdbc doc specfically states that multiple inserts can be performed
without re-issuing the "moveToInsertRow". under instantdb 3.21 i needed to
reissue the moveToInsertRow after each insertRow. see code below
stmt =
dbPhoneConnect.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.C
ONCUR_UPDATABLE);
srs = stmt.executeQuery("SELECT * FROM PHONES");
srs.moveToInsertRow();
srs.updateLong("OID", 1);
srs.updateLong("CALLEROID", 2);
srs.updateString("PHONENUMBER", "203-488-4298");
srs.updateString("PHONETYPE", "OFFICE");
srs.updateString("PHONEEXT", "NONE");
srs.insertRow();
srs.moveToInsertRow();
************* without this throws sql exception
srs.updateLong("OID", 2);
srs.updateLong("CALLEROID", 2);
srs.updateString("PHONENUMBER", "203-483-8052");
srs.updateString("PHONETYPE", "CELL");
srs.updateString("PHONEEXT", "NONE");
srs.insertRow();
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|