Here you can find the source of getResultSetInstance(Connection conn, String sql)
Parameter | Description |
---|---|
conn | a parameter |
sql | a parameter |
@Deprecated private static ResultSet getResultSetInstance(Connection conn, String sql)
//package com.java2s; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { /**/*from www. j a va2s. co m*/ * This method gets the instance of the result Set * * @param conn * @param sql * @return java.sql.ResultSet */ @Deprecated private static ResultSet getResultSetInstance(Connection conn, String sql) { Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); rs = stmt.executeQuery(sql); } catch (SQLException e) { throw new RuntimeException("Could not execute query:" + sql, e); } return rs; } }