Java SQL ResultSet Close closeResultSetAndStatement(Statement statement, ResultSet resultSet)

Here you can find the source of closeResultSetAndStatement(Statement statement, ResultSet resultSet)

Description

close Result Set And Statement

License

Open Source License

Declaration

public static void closeResultSetAndStatement(Statement statement, ResultSet resultSet) throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.ResultSet;
import java.sql.SQLException;

import com.mysql.jdbc.Statement;

public class Main {
    public static void closeResultSetAndStatement(Statement statement, ResultSet resultSet) throws SQLException {
        if (statement != null) {
            statement.close();/*from   w  w w. j av a2  s .c  om*/
        }
        if (resultSet != null) {
            resultSet.close();
        }
    }
}

Related

  1. closeResultSet(ResultSet rs)
  2. closeResultSet(ResultSet rs)
  3. closeResultSet(ResultSet rs)
  4. closeResultSet(ResultSet rs)
  5. closeResultSetAndStatement(ResultSet rs)
  6. closeResultSets(List results)
  7. closeResultSets(List resultSets)
  8. closeRS(final ResultSet rs)