Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC BLOB locking question?

Re: JDBC BLOB locking question?

From: Domenico Gambelli <gambellid_at_yahoo.it>
Date: Sat, 30 Sep 2000 12:21:03 +0200
Message-ID: <39D5BE8F.E53B626C@yahoo.it>

Just a question:

    are you using the "thin" driver or the "oci" ?, because I don't think that your code working fine with the thin driver.

myarch5_at_hotmail.com wrote:

> 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();
>
> - read from stream here
> - manipulate blob
>
> 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 Sat Sep 30 2000 - 05:21:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US