The following ODBC 2.x functions have been duplicated by ODBC 3.x functions. As a result, the ODBC 2.x functions are deprecated in ODBC 3.x. The ODBC 3.x functions are referred to as replacement functions.
When an application uses a deprecated ODBC 2.x function, and the underlying driver is an ODBC 3.x driver, the Driver Manager maps the function call to the corresponding replacement function. The only exception to this rule is SQLExtendedFetch (see footnote in the following table). For more information on these mappings, see Appendix G, "Driver Guidelines for Backward Compatibility."
When an application uses a replacement function, and the underlying driver is an ODBC 2.x driver, the Driver Manager maps the function call to the corresponding deprecated function.
ODBC 2.x function | ODBC 3.x function |
SQLAllocConnect | SQLAllocHandle |
SQLAllocEnv | SQLAllocHandle |
SQLAllocStmt | SQLAllocHandle |
SQLColAttributes | SQLColAttribute |
SQLError | SQLGetDiagRec |
SQLExtendedFetch [1] | SQLFetchScroll |
SQLFreeConnect | SQLFreeHandle |
SQLFreeEnv | SQLFreeHandle |
SQLGetConnectOption | SQLGetConnectAttr |
SQLGetStmtOption | SQLGetStmtAttr |
SQLParamOptions | SQLSetStmtAttr, SQLGetStmtAttr |
SQLSetConnectOption | SQLSetConnectAttr |
SQLSetParam | SQLBindParameter |
SQLSetStmtOption | SQLSetStmtAttr |
SQLTransact | SQLEndTran |
[1] The function SQLExtendedFetch is duplicated functionality; SQLFetchScroll provides the same functionality in ODBC 3.x. However, the Driver Manager does not map SQLExtendedFetch to SQLFetchScroll when going against an ODBC 3.x driver. For more details, see "What the Driver Manager Does" in Appendix G, "Driver Guidelines for Backward Compatibility." The Driver Manager maps SQLFetchScroll to SQLExtendedFetch when going against an ODBC 2.x driver.
Note The function SQLBindParam is a special case. SQLBindParam is duplicated functionality. This is not an ODBC 2.x function, but a function that is present in the X/Open and ISO standards. The functionality provided by this function is completely subsumed by that of SQLBindParameter. As a result, the Driver Manager maps a call to SQLBindParam to SQLBindParameter when the underlying driver is an ODBC 3.x driver. When the underlying driver is an ODBC 2.x driver, however, the Driver Manager does not perform this mapping.