Java SQL ResultSet Close closeResultset(ResultSet resultset)

Here you can find the source of closeResultset(ResultSet resultset)

Description

close Resultset

License

Mozilla Public License

Parameter

Parameter Description
resultset ResultSet

Declaration

public static void closeResultset(ResultSet resultset) 

Method Source Code

//package com.java2s;
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import java.sql.*;

public class Main {
    /**//from  w w  w.j a  v a  2  s . c o  m
     *
     * @param resultset ResultSet
     */
    public static void closeResultset(ResultSet resultset) {
        try {
            if (resultset != null) {
                resultset.close();
            }
        } catch (SQLException e1) {
        } catch (Throwable ex) {
        }
    }
}

Related

  1. closeResources(Connection conn, Statement stmt, ResultSet rs)
  2. closeResources(Connection conn2, Statement statement, ResultSet rs)
  3. closeResultAndStatement(Statement statement, ResultSet resultSet)
  4. closeResultSet(final ResultSet resultSet)
  5. closeResultSet(ResultSet resultSet)
  6. closeResultSet(ResultSet rs)
  7. closeResultSet(ResultSet rs)
  8. closeResultSet(ResultSet rs)
  9. closeResultSet(ResultSet rs)