<%
int pagess=0;
int conuRow=0;
int conuPage=0;
int pagesize=6;
String aa=request.getParameter("pID");////获得页数;
if(aa==null){
pagess=1;
}else{
pagess= Integer.parseInt(request.getParameter("pID"));
} String sql="select * from povince";
ResultSet Setpovince=dbo.getData(sql);
try{
Setpovince.last(); ///<----执行这句就会报错java.sql.SQLException: [Microsoft] // [SQLServer 2000 Driver for JDBC]Unsupported method: // ResultSet.last 这是为什么原因,,请高手帮忙!!!
conuRow=Setpovince.getRow();
Setpovince.absolute(0);
}catch(SQLException aaa){
aaa.printStackTrace();
}
conuPage=conuRow/pagesize;
if(conuRow%pagesize!=0)
conuPage++;
%>
int pagess=0;
int conuRow=0;
int conuPage=0;
int pagesize=6;
String aa=request.getParameter("pID");////获得页数;
if(aa==null){
pagess=1;
}else{
pagess= Integer.parseInt(request.getParameter("pID"));
} String sql="select * from povince";
ResultSet Setpovince=dbo.getData(sql);
try{
Setpovince.last(); ///<----执行这句就会报错java.sql.SQLException: [Microsoft] // [SQLServer 2000 Driver for JDBC]Unsupported method: // ResultSet.last 这是为什么原因,,请高手帮忙!!!
conuRow=Setpovince.getRow();
Setpovince.absolute(0);
}catch(SQLException aaa){
aaa.printStackTrace();
}
conuPage=conuRow/pagesize;
if(conuRow%pagesize!=0)
conuPage++;
%>
解决方案 »
- 请高手来指教下这个应该怎么写呀
- 关于web.xml的配置问题
- session机制
- 【推荐】关于路径问题,请各位帮忙!
- 把jdk+tomcat+mysql+网站(ssh框架做的系统)打包成一个安装文件?
- 学习用JDBC访问SQL2000,大家帮我只要显示就好,test.jsp
- 一个简单的登陆设计问题
- 怎么配置Tomcat和MySQL的连接?(偶初学,大家帮帮忙啊)
- jsp 数据库连接问题!
- Access数据库怎么实现分页显示
- JAVA取得文件真实路径
- 各位前辈,请问js中的replace(/\\/gi,"\\\\").replace(/"/gi,"\\\"").replace(/'/gi,"\\\'")在java中怎么写
给你点提示看下,希望你能明白
boolean last()
throws SQLException将指针移动到此 ResultSet 对象的最后一行。 返回:
如果指针位于有效行,则返回 true;如果结果集中不存在任何行,则返回 false
抛出:
SQLException - 如果发生数据库访问错误或者结果集类型为 TYPE_FORWARD_ONLY从以下版本开始:
1.2