Java examples for java.sql:ResultSet
get Result Set
//package com.java2s; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { public static ResultSet getResultSet(Statement stmt, String sql) { ResultSet rs = null;// ww w. ja v a 2 s . c o m try { rs = stmt.executeQuery(sql); } catch (SQLException e) { e.printStackTrace(); } return rs; } }