Additional question about LONG RAW columns and Pro*C
Date: 1996/02/03
Message-ID: <4f03od$cbd_at_cloner3.netcom.com>#1/1
In <4eudiq$mtn_at_inet-nntp-gw-1.us.oracle.com> smushran_at_us.oracle.com
(Sunil Mushran) writes:
>The oflng() logic flow is as follows:
>Bind a buffer of a fixed size (say 64K). Now each time you call
>oflng(), you will need to mention the offset, which will be the
>previous offset + size of the data retrieved. When this size of the
>data retrieved becomes < bound buffer (64K), there is no need to do
>any more oflng() calls.
>
>sm.
>
I was wondering how to use LONG RAW columns with a Pro*C applicatin as oppossed to a oci app. Luckily, I am creating the table myself and can save the size of the binary object I am storing in another column. However, I am unsure what kind of host variable to use and what data equivalence to assign to it. I have tried a couple of things. In both cases, I use a char* host var. The difference is in what I equivalence it to. In all cases, I malloc() doulbe the size of the actual object stored (Because oracle will send a hex stream - 2 hex chars for each byte).
So, I first try equivalencing it to a LONG RAW. The result is a segmentation fault. I think this is the preferred method - but how big do I make my buffer (I even tried 3X as large - same problem)
Then, since I am just trying to figure it out, I hard code an equivalence of RAW(38) - which is twice the size of the actual number of bytes in the object. This works !!!!!!! However, I obviously can't harcode like this - my BLOBs will all be different sizes.
Please help!!!!
ejpoe_at_ix.netcom.com
Received on Sat Feb 03 1996 - 00:00:00 CET