Java SQL PreparedStatement closeStatement(PreparedStatement preparedStatement)

Here you can find the source of closeStatement(PreparedStatement preparedStatement)

Description

Method to close the PreparedStatement

License

Apache License

Parameter

Parameter Description
preparedStatement a parameter

Declaration

public static void closeStatement(PreparedStatement preparedStatement) 

Method Source Code

//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();
            }
        }
    }
}

Related

  1. closePreparedStatement(Map psMap)
  2. closePreparedStatement(PreparedStatement pstmt)
  3. closePreparedStatement(Statement ps)
  4. closePS(PreparedStatement argPreparedStatement)
  5. closeSilentlyPreparedStatement(PreparedStatement stmt)
  6. closeStatement(PreparedStatement ps)
  7. closeStatement(PreparedStatement theStatement)
  8. createInsertPrepareStatement(Connection conn, String tableName, String[] dataColumnNames)
  9. createPreparedStatement(Connection conn, String sql, String[] args)