Help for ESLQ/C!!!
Posted in 1999
Topics: General Discussion
Why are the "update,insert,delete" translated into the same C function - -"_iqstmnt" from EC ?Then, how can I decide which "_iqstmnt" repersents "update" or "insert" or "delete"? Thank you. robert wane Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
The function: _iqstmt executes a prepared statement. Even if you did not explicitely PREPARE the statement the ESQL/C preprocessor did so for you using a dummy statement name (look for the _iqnprep call). Of course you still do not know what the statement type is. Why do you need to know? I mean don't you know what you coded in the .ec file? Why do you need to parse the .c output? If this is for Dynamic SQL then after you prepare the statement you can DESCRIBE it and the SQL DESCRIPTOR, or the sqlda structure, depending on how you do the describe, will contain the statement type code which you can look up in the header file $INFORMIXDIR/incl/esql/sqlstype.h. Art S. Kagel robertwane@hotmail.com wrote: > > Why are the "update,insert,delete" translated into the same C function - > -"_iqstmnt" from EC ?Then, how can I decide which "_iqstmnt" > repersents "update" or "insert" or "delete"? > Thank you. > > robert wane > > Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't.
robertwane@hotmail.com wrote: > > Why are the "update,insert,delete" translated into the same C > function - -"_iqstmnt" from EC ?Then, how can I decide which > "_iqstmnt" repersents "update" or "insert" or "delete"? Because the same function handles all those statements, and a whole bunch of others too. By looking at the arguments? And why do you need to know? -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>