Version Introduced: ODBC 3.81 Standards Compliance: ODBC
SQLGetPoolID retrieves the pool ID.
SQLRETURN SQLGetPoolID ( SQLHDBC_INFO_TOKEN hDbcInfoToken, POOLID * pPoolID );
[Input] Token handle that contains all connection information.
[Output] The pool ID, which is used to identify a set of connections that can be used interchangeably (possibly requiring an additional reset).
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
When SQLGetPoolID returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, the Driver Manager will use a HandleType of SQL_HANDLE_DBC_INFO_TOKEN and a Handle of hDbcInfoToken.
SQLGetPoolID is used to obtain the pool ID given a set of connection information (from SQLSetConnectAttrForDbcInfo, SQLSetDriverConnectInfo, and SQLSetConnectInfo). This pool ID is used to identify a set of connections that can be used interchangeably (possibly requiring an additional reset). The pool ID will be used to identify the connection pool for that group of connections.
Whenever a driver returns SQL_SUCCESS_WITH_INFO, the Driver Manager will obtain the diagnostic information from hDbcInfoToken, and return SQL_SUCCESS_WITH_INFO to the application in SQLConnect and SQLDriverConnect.
Applications should not call this function directly. An ODBC driver that supports driver-aware connection pooling must implement this function.
Include sqlspi.h for ODBC driver development.