This is a discussion on C embedded sql - Problems when using C preprocessor values in host variables declarations within the Sybase forums, part of the Database Server Software category; --> My code declares a HOST variable this way: #define NAME_LEN 80 .... EXEC SQL BEGIN DECLARE SECTION; char sqlName[NAME_LEN]; ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| ||||
| I think that is a bug that has been fixed in the latest EBFs. The bug number is: 216372 ESQL/C: cpre and cobre used with -G flag did not use actual character array size for stored procedure's parameter. There was another similar bug that has also been fixed in recent EBFs: 239138 CPRE/COBPRE: When using -G option and an invalid stored procedure parameter's character size is specified, this is not defaulted to 255. If it is still a problem after you apply the most recent EBF, you should probably contact technical support. |