Compilation and linking of C/C++ applications and the IBM OLE DB Provider

If you write C/C++ applications that use the constant CLSID_IBMDADB2, you must include the ibmdadb2.h header file. You can find the header file in the SQLLIB\include directory.
These applications must define DBINITCONSTANTS before the include statement. The following example shows the correct sequence of C/C++ preprocessor directives:
   #define DBINITCONSTANTS
   #include "ibmdadb2.h"