SQLAllocEnv
Function
Allocates an environment handle. It can be replaced with SQLAllocHandle.
Prototype
c
SQLRETURN SQLAllocEnv(SQLHENV *EnvironmentHandle);Parameters
Table 1 SQLAllocEnv parameters
A pointer to a variable of type SQLHENV. Upon successful function execution, this variable stores the newly allocated environment handle. |
Return Values
SQL_SUCCESS: The call is successful.
SQL_ERROR: The environment handle failed to be allocated.
NOTE
To make the code structure clearer and easier to maintain, it is recommended to use the standard interface SQLAllocHandle instead of SQLAllocEnv to allocate an environment handle.
Example
See: Example