public static RowSet query(String sql) throws ClassNotFoundException, SQLException {

		Connection conn = getConnection();
		try {
			Statement st = (Statement) conn.createStatement();
			CachedRowSetImpl rowSet = new CachedRowSetImpl();
			ResultSet rs = st.executeQuery(sql);
			rowSet.populate(rs);
			
			rs.close();
			st.close();
			
//			conn.close();
			return rowSet;

		} catch (SQLException e) {
			System.out.println("查询失败" + e.toString());
			return null;
		}
	}