Re: reading long raw data
Date: Wed, 7 Jul 1993 01:26:08 GMT
Message-ID: <C9rtBn.48q_at_ipsa.reuter.com>
In article <and.16.741857527_at_thor.mim.uni-hannover.de> and_at_thor.mim.uni-hannover.de (Andreas Kromke) writes:
>I have a problem storing binary data with ORACLE.
>I created a table with a "long raw" column...
>Pro*C with VARCHAR doesn't work
I was advised (by Oracle) that I had to use dynamic method 4. But in reading their example, I decided that I could get want I wanted by editing the result from the PRO*C compiler (i.e. before the C compile).
What I wrote was a script that replaced the type 9 with a type 15.
And that works fine for me.
I declare the variable as VARCHAR, and set the length in the normal manner
(x.arg = ).
This is what the block of code looked like after I altered the PRO*C output:
sq033.sq033V[8] = (unsigned char *)&gLongRaw.len; sq033.sq033L[8] = (unsigned long)32766; sq033.sq033T[8] = (unsigned short)15; sq033.sq033I[8] = (unsigned short *)0;
That '15' was a '9'; I was able to apply this script/patch, since the number 32766 is somewhat unique in my program.
/jhs
-- J. Henri Schueler, H&h Software, Toronto +1 416 698 9075Received on Wed Jul 07 1993 - 03:26:08 CEST