Here you can find the source of closeStatement(PreparedStatement preparedStatement)
Parameter | Description |
---|---|
preparedStatement | a parameter |
public static void closeStatement(PreparedStatement preparedStatement)
//package com.java2s; //License from project: Apache License import java.sql.PreparedStatement; import java.sql.SQLException; public class Main { /**/*from w ww. jav a2s. c o m*/ * Method to close the PreparedStatement * * @param preparedStatement */ public static void closeStatement(PreparedStatement preparedStatement) { if (preparedStatement != null) { try { preparedStatement.close(); } catch (SQLException exception) { exception.printStackTrace(); } } } }