易截截图软件、单文件、免安装、纯绿色、仅160KB

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 
int pageCount; //总的页数 
int currPage; //当前页数 
String strPage; 
strPage=request.getParameter("page"); 
if (strPage==null){ 
currPage=1; 

else{ 
currPage=Integer.parseInt(strPage); 
if (currPage<1) currPage=1; 

pageCount=(rowCount+pageSize-1)/pageSize; 
if (currPage>;pageCount) currPage=pageCount; 
int thepage=(currPage-1)*pageSize; 
int n=0; 
rs.absolute(thepage+1); 
while (n<(pageSize)&&!rs 
%>; 
<%rs.close(); 
rscount.close(); 
stmt.close(); 
stmtcount.close(); 
conn.close(); 
%>; 
//下面是 第几页等 
<form name="sinfo" method="post" action="sbinfo_index.jsp?condition=<%=condition%


相关文档:

JSP学习(一)

JSP基本语法
大部分JSP被一个以“<%” 开头和以“%>”结尾的的标记括在其中。在更新的JSP 1.1规范出台后,就有了与XML兼容的版本。
JSP指令和脚本元素
Directives <%@ directive %>
Declarations <%! declaration %>
Expressions <%= expression %>
Code Fragment/ ......

Oracle大文本在ASP中存取问题的解决


在我开发BS结构程序中,由于经常需要在ORACLE中处理一些容量较大的文本数据,所以经过反复测试终于用ASP成功解
决了大文本数据在ORACLE下存取问题。
  
  一、运行环境:
  1、Microsoft Windows 2000 Server + IIS 5.0
2、Oracle8i中文标准版
  
  二、建立数据表:
  CREATE TABLE SYSTEM.TEST(
B ......

[推荐] 深度对比Oracle与SQL Server [1]

本译文采用知识共享署名-非商业性使用-相同方式共享 3.0 Unported许可协议发布,转载请保留此信息
译者:马齿苋 | 链接:http://www.dbabeta.com/2010/oracle-sql-server-comparison-i.html
作者:Sadequl Hussain | 原文:http://www.sql-server-performance.com/articles/dba/oracle_sql_server_comparison_p1.aspx
一 ......

jsp连接oracle数据库

首先你要有tomcat,还要有oracle jdbc的jar档等环境.
第一步:  写JSP
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@(des ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号