On Monday, February 17, 2003, at 12:47 PM, Rod Macpherson wrote:
The standard JDBC result set returns the blob without any vendor-specific
magic aside from using the correct driver. The actual column type is an
oracle blob and we use that to update the column by writing a stream
supplied by oracle-specific getBinaryOutputStream since there is no
setBytes() on the java.sql.Blob - convenient. At the same time a
FileInputStream should work just fine with setObject (will bet dollars to
donuts) and none of that involves oracle-specific code. The reason believe
that is the code below will only load small "large" objects (doh!) under
jboss. It works fine with a weblogic datasource or with a vanilla JDBC
connection.
oracle.sql.BLOB blob = (oracle.sql.BLOB)resultSet.getBlob("foo");
BufferedOutputStream stream = new BufferedOutputStream(
blob.getBinaryOutputStream() );
stream.write(bytes);
...
Doesn't this just confirm my remark:
I believe the direct support is through Oracle specific API's.
and to which you responded:
?FALSE.
FileInputStream? What file?
I must confess that it has never occurred to me to pass an InputStream to setObject. What makes you think that will work (on all/most platforms).
Regards,
Steve Coy
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
