--- title: "close Method (SQLServerPreparedStatement) | 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: - "SQLServerPreparedStatement.close" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 36db9ff7-5819-4827-9803-4a81c99069b3 author: David-Engel ms.author: v-daenge --- # close Method (SQLServerPreparedStatement) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Releases the database and JDBC resources of this Statement object immediately instead of waiting for them to be automatically released. ## Syntax ``` public void close() ``` ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This close method is specified by the close method in the java.sql.Statement interface. ## See Also [SQLServerPreparedStatement Members](../../../connect/jdbc/reference/sqlserverpreparedstatement-members.md) [SQLServerPreparedStatement Class](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md)