下述操作中出现了下列提示:
getConnection();
stmt=con.createStatement();
rs=stmt.executeQuery(sql);
pageCount=rs.getInt("pagecount");
报错:Invalid operation for the current cursor position.
原因是返回的ResultSet对象的游标还在数据集的最上方,需要加一句:rs.next()!
搞定!!