SQLAllocEnv (core level only)
SQLAllocEnv allocates memory for an environment handle and initializes the driver call level interface for application use.
An application must call SQLAllocEnv before it calls any other driver function.
A driver cannot return SQLSTATE values directly after the call to SQLAllocEnv because no valid handle exists with which to call SQLError.
- SQLSTATE S1000 (General error)
- The HCL OneDB™ ODBC
Driver SQLSTATE value, which ranges
from
S1000
toS19ZZ
.For example, SQLSTATE S1001 (Memory-allocation failure) indicates that the call from the driver manager to the driver-level SQLAllocEnv returned SQL_ERROR, and the henv from the driver manager was set to SQL_NULL_HENV.