Re: ESQL/C and C++
Posted in 1998
Juan C. Luna wrote: > I was wondering if somebody knows about how to blend C++ features with > ESQL/C Informix. Is there a product that allows to build constructor > members in a host variable? > something like: > struct xxx { > int x > int y > xxx () { > x=0; > y=0; > } There should be in the IIUG archives my best efforts at C++ support with ESQL/C. However, it assumes that you use the C-subset of C++ in the code which actually interacts with the database. Your variable declarations in EXEC SQL BEGIN/END DECLARE SECTION need to be recognizable by the ESQL/C compiler which has but rudimentary knowledge of C types, let alone C++ types. I don't think that what you're asking for will work -- not directly, anyway. You might manage to wrap a class with constructor around a structure without constructor, but the ESQL/C code would need to see the structure (or a pointer to it) and not the class. Yours, Jonathan Leffler (jleffler@visa.com) #include <many-aliases.h>