Re: Informix ESQL/C and C++ .
Posted in 1996
Saeed Talebbeik wrote: > > Folks, I have the following questions regarding using the Informix > ESQL/C precompiler with a C++ program: > 1) Does the esqlc precompiler work with C++ programs which have > embedded sql statements ? Are there any problems ? I believe it does, however when I write ESQL/C and C++ / C, I tend to avoid the problem. No matter which OO language you use, you still call routine functions from you method. To jump any sematic gaps, objects are composed of data elements and actions. Methods are those actions. These *common* routines can be external to your class library. Examples of this are common error handling routines, special printing functions, ... What I tend to do is create a library of my database code. So in my C++ I create an abstract method like SelectFromDB[] (Sorry its Objective C]. This method then builds the strings necessary for Dynamic SQL and passes them to a simple ESQL/C function which will get the data from the database and passes it back to the calling function. [But thanks to the EOF adaptor, I don't need to do this. ;-] I also did this when working in an X-Windows/C app too. Sort of layering the functionality of the app. > 2) Are there any good object libraries that work with Informix ? > 3) Have you heard of the EPC C++ environment on the Sequent platform? > How robust is this environment ? Sorry, I haven't heard of any. Hope this helps, it just my $.02 worth. -Mikey