C embedded sql - Problems when using C preprocessor values in host variables declarations My code declares a HOST variable this way:
#define NAME_LEN 80
....
EXEC SQL BEGIN DECLARE SECTION;
char sqlName[NAME_LEN];
....
EXEC SQL END DECLARE SECTION;
I precompile this way: "cpre -G -r -m -a myprogram.cp"
For some reason, within the .sql file this is declared as @sqlName
char(NAME_LEN), instead of @sqlName char(80).
Later, when I use isql to upload the store procedure, it fails saying
it doesn't recognize the variable NAME_LEN.
Is there any config option I should set to prevent this from
happening? I had a look at the messages in this group and didn't find
any on this.
I'm newbie on Sybase embedded SQL, so excuse my ingorance.
The Open client version is: CS_VERSION_110
Thanks in advance,
Gabriel. |