Here you can find the source of close(ResultSet rs)
Parameter | Description |
---|---|
rst | ResultSet |
public static void close(ResultSet rs)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008 Ingres Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// www. j a va 2 s . c o m * Ingres Corporation - initial API and implementation *******************************************************************************/ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { /** * Close the statement and ignores thrown SQLExceptions. * * @param stmt * Statement */ public static void close(Statement stmt) { try { if (stmt != null) { stmt.close(); } } catch (SQLException e) { // ignored } } /** * Close the result set and ignores thrown SQLExceptions. * * @param rst * ResultSet */ public static void close(ResultSet rs) { try { if (rs != null) { rs.close(); } } catch (SQLException e) { // ignored } } }