Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8.1 OCI array inserts of strings

Re: Oracle 8.1 OCI array inserts of strings

From: Arien Malec <amalec_at_slip.net>
Date: Sat, 21 Aug 1999 12:56:43 -0700
Message-ID: <37BF047B.9E61CB5A@slip.net>


This did wonders. I made the array of sb2's, cast the strlen calls, and removed the cast on the OCI call: perfect success.

Many thanks,
Arien

Thomas Kyte wrote:

> thats the Key. the array of lengths are to be sb2's (short binary 2 bytes).
> You are sending ints. I'll betcha an int is 4 bytes on your platform (most
> are). the first 2 bytes are OK and used for Hello World. The next 2 are 0 (the
> other half of the length of Hello World) and thats why the 2'cnd row is null --
> zero length string. The third pair of bytes is really the first 2 bytes of the
> second length and is used for the third string (if you select dump(message) from
> hello, you'll see trailing NULLS on "bonjour, monde" upto 22 bytes).
Received on Sat Aug 21 1999 - 14:56:43 CDT

Original text of this message

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