Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> JDBC BLOB locking question?
i am using blob with jdbc and i've gotten it to work, but my question is with locking....i'm wondering if i'll have a syncronization issue since it's not one nice and easy "update" transaction with a blob...here's my general code
table miketable (
userid varchar2(10),
timestamp date,
iodata blob;
rslt=stmt.executeQuery("SELECT iodata FROM miketable WHERE userid=100");
rslt.next();
inBlob = ((OracleResultSet)rslt).getBLOB(1);
inStream = inBlob.getBinaryStream();
executeUpdate("UPDATE miketable set timestamp = sysdate");
rslt=stmt.executeQuery("SELECT iodata FROM miketble WHERE userid =100");
rslt.next();
outBlob = ((OracleResultSet)rslt).getBLOB(1);
outStream = outBlob.getBinaryOutputStream();
-write blob to database
I'm concerned that "updating" a blob is not just a nice an easy one step transaction....so, inbetween, i'm wondering if another db process could update the record??? i call a second time for the blob handle (after the update) just incase if the handle has been chaned from the update....i'm not sure if i really need to do this....but i still have the multi-step transaction issue.
mike
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 29 2000 - 16:41:22 CDT