Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to init blob in java-code thats in the db?
bdj <B.D.Jensenremove_at_gmx.net> wrote:
> I want to write some java-code (CREATE OR REPLACE AND RESOLVE JAVA SOURCE
> NAMED...)
>
> where I want to return an image as blob.
> For doing that I have to initialize the blob in the java-code -correct?
> I see many examples like
> oracle.sql.BLOB.createTemporary(conn, false,oracle.sql.BLOB.DURATION_CALL)
>
> If I have to initialize the blob in the java source, how to do that?
Sorry to answer with a question, but what do you mean by initialize?
Create an instance of BLOB? Fill it with data?
Does BLOB.createTemporary() not do what you want?
You can write to the Blob with
java.sql.Blob.setBinaryStream(1l)
Yours,
Laurenz Albe
Received on Tue Apr 18 2006 - 03:31:10 CDT
![]() |
![]() |