public RowSet queryRowSet(String sql) {
		Connection conn=ConnectionFactory.getConnection();
		ResultSet rs=null;
		Statement stmt=null;
		try {
			stmt=conn.createStatement();
			rs=stmt.executeQuery(sql);
			CachedRowSet crs=new CachedRowSetImpl();
			crs.populate(rs);
			
			return crs;
		} catch (SQLException e) {
			 
			e.printStackTrace();
			
			return null;
		} finally{
			 
			SQLCommand.close(rs);
			SQLCommand.close(stmt);
			SQLCommand.close(conn);
		
		}
		
		
	}