When using the ODBC Driver Manager/drivers , you need to call ibmODBCLicInfo immediately following a call to the SQLConnect, SQLDriverConnect, or SQLBrowseConnect functions. You need to pass the argument 'hdbc' to ibmODBCLicInfo like this:
sql_rc = ibmODBCLicInfo(myHDBC);
The ibmODBCLicInfo routine is included in the ibmodlic.lib library which must be included in the link step of your program. Refer to the sample program, odbcsamp.pli for more information.