resultset用尽的问题
public Vector getPage(int ipage){
Vector vData=new Vector();
int n=ipage;
int m=0;
m=(n-1)*this._pagesize+1;
try{
if (rs!=null)
{
rs.absolute(m);
for(int i=0;i<this._pagesize;i++){
String[] sData=new String[rsmd.getColumnCount()];
for(int j=0;j<rsmd.getColumnCount();j++)
{
sData[j]=rs.getString(j+1);
}
if (sData==null)
{
break;
}
vData.addElement(sData);
rs.next();
}
}
rs.close();
stmt.close();
}
catch(SQLException e){System.out.println(e.toString());}
return vData;
}
程序运行时正常,就是老是报resulstSet用尽,大侠们指点指点
问题点数:10、回复次数:5Top




