Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle 9 and Blobs
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