Re: ESQL/C Serial Column Type?
Posted in 1996
William Harris — — source: Informix-list mailing list archive (1991-1998)
In article <57k6fe$p2i$1@loki.tor.hookup.net>, Rajendra_Singh@msn.com says... >I have an ESQL/C program which needs to determine which column of a >table is of type SERIAL. According to the reference manual, a serial >column is 6. I tried the following: > >if (type == 6 || type == SQLSERIAL) > { > . > . > . > } Whenever you're working with Informix data types, you need to "&" the type with SQLTYPE, as follows: if((type & SQLTYPE) == SQLSERIAL) { /* serial processing */ } The SQLNONULL flag (currently defined as 0x100) is set for non-nullable columns. -- William Harris william@carsinfo.com CARS Information Systems 4000 Executive Park Drive Cincinnati, OH (USA) 45241