How to add ESQL function calls to the Informix Access Library

Article ID: 985
Last updated: 01 Feb, 2008
Article ID: 985
Last updated: 01 Feb, 2008
Revision: 1
Views: 11943
Posted: 05 Nov, 1999
by Dean J.
Updated: 01 Feb, 2008
by Dean J.
Problem


How can I add additional Informix ESQL calls to the Informix Access Library?


Cause


DBTools.h++ does not support all of the ESQL/C calls to the Informix Access Library.


Action


To add additional ESQL/C calls you need to edit two files: infesql.ec and infesql.h. In infesql.ec, you need to create a wrapper function that calls the ESQL/C code you want to use. For example:

void esqlBreakCall(int timeout)
{
sqlbreakcallback(timeout, callback);
}

Function esqlBreakCall() takes an argument of a timeout value (in milliseconds) and passes that argument to the ESQL/C function sqlbreakcallback().


Note: the example above is incomplete. A separate callback function would also be needed for this to work.

You then need to add declarations for your new functions to the file infesql.h.

After these two changes are made, the Informix Access Library will need to be re-complied. Upon completion of this step, your new functions will be a part of the Informix Access Library and available to call.

You need to #include the infesql.h file in your source code to give the preprocessor knowledge of your function declarations. You also need to add the Informix Access Library File (i.e. -libinf7d) to your link line for the definition of custom functions.

A few Informix directories will need to be included in your project/makefile.

Additional Include Directory

  • $INFORMIXDIR/incl/esql

Additional Library Directories

  • $INFORMIXDIR/lib/esql
  • $INFORMIXDIR/lib
This article was:   Helpful | Not helpful
Report an issue
Article ID: 985
Last updated: 01 Feb, 2008
Revision: 1
Views: 11943
Posted: 05 Nov, 1999 by Dean J.
Updated: 01 Feb, 2008 by Dean J.

Others in this category