Here you can find the source of executeSQLCommandWithResult(Connection conn, String sql)
public static ResultSet executeSQLCommandWithResult(Connection conn, String sql) throws SQLException
//package com.java2s; //License from project: LGPL import java.sql.*; public class Main { public static ResultSet executeSQLCommandWithResult(Connection conn, String sql) throws SQLException { conn.setAutoCommit(true);/*from ww w . ja v a 2s .c o m*/ Statement st = conn.createStatement(); return st.executeQuery(sql); } }