ESQLC help needed for C 'typedef'
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hello fellow Informix netters! I have another interesting question for any knowledgeable individuals. For the record, we're running Informix-SE 4.00.UH1 on a Sun SPARCstation 1+ running SunOS 4.1.1. What I've been doing for some time is taking advantage of Informix's support of the 'C' constructs 'typedef' and 'struct' to declare Informix 'types'. I usually create a #define in a C header file for the body of my structure and use that definition for all structure definitions. This creates consistency between different structure declarations that are actually the SAME structure. So I create one 'C' structure and one 'SQL' structure from this #define. (I get around some of the problems by running the raw .ec file through 'cpp' to get the constant definitions expanded; then I run the file through 'esql'.) ANYWAYS, I just tried using a structure definition that used a type that was created from an 'enum'. It seems that no matter what I try, Informix (esqlc) won't recognize my structure with the 'enum' in its definition. It gets confused on 'enum' in the SQL DECLARE SECTION. Is there anything I'm doing wrong? (Or is it that ESQL/C simply doesn't recognize 'enums'?) Assuming that I am doing something wrong, are there any plans to extend ESQL/C to encompass the 'enum' as it has the 'typedef', 'struct', '#define'? If you'd prefer to email me, I will post a summary of the responses. Thanks a TON in advance! Joe P.S. If anybody wants more info on my 'method', email me for details. -- Joseph P. Tokarski tokarski@ttd.teradyne.com Teradyne Telecommunications (708) 940-9000 ext. 2747 Deerfield, Illinois USA