Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Fetching from LONG in Pro*C
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
Received on Sat Jun 19 2004 - 14:28:31 CDT