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: Fetching from LONG in Pro*C

Re: Fetching from LONG in Pro*C

From: anacedent <anacedent_at_hotmail.com>
Date: Sat, 19 Jun 2004 13:06:49 -0700
Message-ID: <u11Bc.13473$8r5.10958@fed1read03>


Pedro Oguri wrote:

> How can I fetch a LONG type into a C variable using Pro*C compiler?
> What´s wrong with this code?
>
> typedef struct TAGmy_raw
> {
> long len;
> unsigned char arr[2000000];
> }
> my_raw;
>
> EXEC SQL BEGIN DECLARE SECTION;
> EXEC SQL TYPE my_raw IS LONG;
> my_raw buffer;
> EXEC SQL END DECLARE SECTION;
>
> EXEC SQL SELECT LONG_COLUMN
> INTO :buffer
> FROM TABLE_X
> WHERE ID=1;
>
> The code, compiles and executes it.
> But buffer.len and buffer.arr return all zeroed
>
> This insertion code works OK though:
> EXEC SQL
> INSERT INTO TABLE_X (LONG_COLUMN)
> VALUES (:var);
>
> Any help?
> Tks,
> Pedro Oguri

Google is your friend!

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:702825000306 Received on Sat Jun 19 2004 - 15:06:49 CDT

Original text of this message

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