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: Using BLOBs in OCI

Re: Using BLOBs in OCI

From: Shmuel Cohen <shmulik_at_ix.netcom.com>
Date: Sun, 18 Jul 1999 11:13:29 GMT
Message-ID: <378fe168.3121628@nntp.ix.netcom.com>


On Fri, 16 Jul 1999 10:40:57 +0100, "John Hatcher" <jhatcher_at_uk.oracle.com> wrote:

Is source available for OCI++ ?

>Barak,
>
>You must get your Lob Locator from the database before you can write to it.
>
>The following code uses OCI++, but the principal is the same.
>
> // create table l (lob clob);
> COCITransaction t(s1);
>
> COCIStatement stmt(s1);
> COCICLob l(s1);
> l.make_empty();
> stmt = "insert into l values (:input) returning lob into :output";
> stmt.bind(":input",l);
> stmt.bind(":output",l);
> if(stmt.execute())
> {
> l << "Hello " << "World";
> }
>
> t.commit();
>
>
>OCI++ taken from:-
>
>http://freespace.virgin.net/j.hatcher/ociwrap.htm
>
>John.
>
>
>BARAK wrote in message <37898f22.0_at_news.barak.net.il>...
>>Hi,
>>I have this problem:
>>
>>I'm using OCI combined with PRO C.
>>
>>I'm using "OCILobWrite" OCI function to put a BLOB data, but keep getting a
>>(-2)
>>return code. (BAD HANDLE).
>>
>>cc=OCILobWrite(oschp,errhp , ez_blob, &ez_len, (ub4) 0,
>> (dvoid *)buf, (ub4) ez_len, OCI_ONE_PIECE,
>> (dvoid *) 0,
>> (sb4 (*)(dvoid *, CONST dvoid *, ub4 *, ub1 *)) 0,
>> (ub2) 0, (ub1) SQLCS_IMPLICIT);
>>
>>There are 3 handle: oschp which is the service context.
>> errhp is the error handle.
>> ez_blob is the blob identifier.
>>All three were allocated as shown in examples.
>>
>>can anyone help?
>>
>>Eyal.
>>
>>
>>
>
>
Received on Sun Jul 18 1999 - 06:13:29 CDT

Original text of this message

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