rs.getMetaData().getColumnCount() 的问题

当sql语句为:


select xx as 矿名,xx1 as 传感器,cast(MAX(a.RTData) as numeric(4,2)) AS 最大值 from book

需要将查询的结果做分页处理,取出结果放入容器,好象可以

k=rs.getMetaData().getColumnCount();
System.out.println(k);
for(int iii=0;iii<=k;iii++){
Vector tempList = new Vector();
String www=rs.getString(iii);
}

请问这个时候该怎么存放数据比较合适?而且我在使用以上语句后运行报错:无效的光标描述