SQLAllocConnect--Allocate connection handle

In ODBC Version 3, SQLAllocConnect() was deprecated and replaced with SQLAllocHandle(); see SQLAllocHandle--Allocate handle for more information.

Recommendation: Although this version of CLI continues to support SQLAllocConnect(), use SQLAllocHandle() in your CLI programs so that they conform to the latest standards.

Migrating to the new function

The statement:

   SQLAllocConnect(henv, hdbc);
 

for example, would be rewritten using the new function as:

   SQLAllocHandle(SQL_HANDLE_DBC, henv, hdbc);
 

Zugehörige Referenzen