Sample programs

A sample program, Demo1, is included in %INFORMIXDIR%\demo\oledbdemo\Demo1.

The sample program is a complete project that introduces how to use OLE DB interfaces in a C++ application. It performs the following tasks:
  • Connects to HCL Informix® by creating a DataSource object
  • Creates a Session object
  • Creates a Command object
  • Executes SQL statements to perform the following tasks:
    • Drop the table MyTable, if it exists
    • Create the table MyTable
    • Insert records in MyTable
  • Deletes the Command object
  • Deletes the Session object
  • Disconnects the database and server connection and deletes the DataSource object

Another sample program is included in INFORMIXDIR\demo\oledbdemo\DistTxn\.