enum values in EXEC SQL statement

From: <mguillem_at_my-deja.com>
Date: Wed, 24 Nov 1999 13:35:51 GMT
Message-ID: <81gpjn$ogr$1_at_nnrp1.deja.com>



[Quoted] It seems not possible to refer to an enum value within a EXEC SQL statement like this:

EXEC SQL begin declare section;

   enum toto (t1=1, t2, t3);
EXEC SQL end declare section;

EXEC SQL select * from myTable where myKey > :t2;

When pre-compiling the above code pro*C/C++ says t2 has to be declared.

I guess this occurs because pro*C/C++ uses addresses of bind variables and it can't do it for enum values. But in this case why don't he create a new variable initialized with the enum value and then uses it's address to communicate with Oracle. This would permit a direct use of enum values defined elsewhere in a header file.

Can someone contradict my interpretation of this problem, or confirm it?

Marc.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Nov 24 1999 - 14:35:51 CET

Original text of this message