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 -> Re: how to init blob in java-code thats in the db?

Re: how to init blob in java-code thats in the db?

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 18 Apr 2006 08:31:10 GMT
Message-ID: <1145349064.469343@proxy.dienste.wien.at>


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

Original text of this message

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