Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 962 Bytes

sqlallocenv-mapping.md

File metadata and controls

25 lines (21 loc) · 962 Bytes
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
SQLAllocEnv Mapping
SQLAllocEnv Mapping
David-Engel
davidengel
01/19/2017
sql
connectivity
reference
SQLAllocEnv function [ODBC], mapping
mapping deprecated functions [ODBC], SQLAllocEnv

SQLAllocEnv Mapping

When an application calls SQLAllocEnv through an ODBC 3.x driver, the call to SQLAllocEnv(phenv) is mapped to SQLAllocHandle as follows:

  1. The Driver Manager allocates an environment handle and returns it to the application. The Driver Manager calls SQLSetEnvAttr to set the SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC2.

  2. When the application establishes the first connection to a driver, the Driver Manager calls

    SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, OutputHandlePtr)  
    

    in the driver with OutputHandlePtr set to phenv.