我爱Aspx >> C#.Net >> 详细的jsp分页(oracle+jsp+apache)我的一个详细的jsp分页程序!(oracle+jsp+apache)
一 前提
希望最新的纪录在开头给你的表建立查询:
表:mytable
查询:create or replace view as mytable_view from mytable order by id desc 其中,最好使用序列号create sequence mytable_sequence 来自动增加你的纪录id号
二 源程序
<%String sConn="你的连接"
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection(sConn,"你的用户名","密码");
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
Statement stmtcount=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs=stmt.executeQuery("select * from mytable_view");
String sqlcount="select count(*) from mytable_view";
ResultSet rscount=stmtcount.executeQuery(sqlcount);
int pageSize=你的每页显示纪录数;
int rowCount=0; //总的记录数
while (rscount
Ҷƪл˵?
ASP开发中存储过程应用全接触[07-30]
种种证据显示 Windows XP SP3存在..[07-30]
一招把病毒木马全部拒之门外[07-30]
用Photoshop通道混合器修复破损的..[07-30]
在Windows Vista中轻松实现宽带自..[07-30]
CD光盘超容量刻录技巧及注意事项[07-30]
在Linux系统下建立强大的FTP搜索..[07-30]
在移动硬盘安装多个虚拟随身操作..[07-30]
卡巴斯基误杀导致XP系统崩溃的解..[07-30]
高手告诉你如何清除局域网中的AR..[07-30]