SQLAllocStmt--Allocate a statement handle

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

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

Migrating to the new function

The statement:

SQLAllocStmt(hdbc, hstmt);
 

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

SQLAllocHandle(SQL_HANDLE_STMT, hdbc, hstmt);
 

Související odkazy