All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.panhongan.util.sql.SqlUtil Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show newest version
package com.github.panhongan.util.sql;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class SqlUtil {

	public static void closeConnection(Connection conn) {
		if (conn != null) {
			try {
				conn.close();
			} catch (Exception e) {
			}
		}
	}
	
	public static void closeStatement(Statement stmt) {
		if (stmt != null) {
			try {
				stmt.close();
			} catch (Exception e) {
			}
		}
	}
	
	public static void closeResultSet(ResultSet rs) {
		if (rs != null) {
			try {
				rs.close();
			} catch (Exception e) {
			}
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy