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

Home -> Community -> Usenet -> c.d.o.misc -> Oracle 9 and Blobs

Oracle 9 and Blobs

From: Matthias Sondermann <matthias.sondermann_at_rwth-aachen.de>
Date: Tue, 02 Mar 2004 10:42:50 +0100
Message-ID: <4044571A.4010705@rwth-aachen.de>


Hi,

normally I use the classical way to fill blob-fields in a database: Inserting empty_blob() then select ... for update and updating

But now I tried something like this:

(the table my_table in the Oracle 9 database has only one field from type Blob)

String str = "INSERT INTO my_table (?)"; PreparedStatement stat = getConnection().prepareStatement(str); String teststr = "aabbccdd.....";
stat.setBytes(1, teststr.getBytes());
stat.executeUpdate();

And it seems to work. Why?
Are there any problems with it, because I only found informations about the first method?

Thank you for answering,
Matthias Received on Tue Mar 02 2004 - 03:42:50 CST

Original text of this message

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