--- title: "getPooledConnection Method (java.lang.String, java.lang.String) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerConnectionPoolDataSource.getPooledConnection (java.lang.String, java.lang.String)" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: f2e6391d-9aaf-4b09-ae1c-a27c1ada6301 author: David-Engel ms.author: v-daenge --- # getPooledConnection Method (java.lang.String, java.lang.String) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Tries to establish a physical database connection that can be used as a pooled connection based on the given user name and password. ## Syntax ``` public javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password) ``` #### Parameters *user* A **String** that contains the user name. *passwword* A **String** that contains the password. ## Return Value A [SQLServerPooledConnection](../../../connect/jdbc/reference/sqlserverpooledconnection-class.md) object. ## Exceptions java.sql.SQLException ## Remarks This getPooledConnection method is specified by the getPooledConnection method in the javax.sql.ConnectionPoolDataSource interface. ## See Also [getPooledConnection](../../../connect/jdbc/reference/getpooledconnection-method-sqlserverconnectionpooldatasource.md) [SQLServerConnectionPoolDataSource Methods](../../../connect/jdbc/reference/sqlserverconnectionpooldatasource-methods.md) [SQLServerConnectionPoolDataSource Members](../../../connect/jdbc/reference/sqlserverconnectionpooldatasource-members.md) [SQLServerConnectionPoolDataSource Class](../../../connect/jdbc/reference/sqlserverconnectionpooldatasource-class.md)