SQLAllocConnect
Function
Allocates a connection handle. It can be replaced with SQLAllocHandle.
Prototype
c
SQLRETURN SQLAllocConnect(SQLHENV EnvironmentHandle,
SQLHDBC *ConnectionHandle);Parameters
Table 1 SQLAllocConnect parameters
Return Values
SQL_SUCCESS: The call is successful.
SQL_SUCCESS_WITH_INFO: Some warning information is present.
SQL_ERROR: The connection handle failed to be allocated.
SQL_INVALID_HANDLE: The input handle is invalid.
NOTE
To make the code more robust and easier to maintain, it is recommended to use the standard interface SQLAllocHandle instead of SQLAllocConnect.
Example
See: Example