<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据查看</title>
<style type="text/css">
<!--
.style2 {font-size: 24px}
-->
</style>
</head>
<body>
<%
set adoconn=Server.Createobject("adodb.connection")
adoconn.open "Provider=OraOLEDB.Oracle.1;Persist Security Info=True;User ID=scott;Password=tiger;Data Source=Oracle"
set adors=server.CreateObject("adodb.recordset")
adors.open"select * from kh1",adoconn,1,2
const page=1
adors.PageSize = 20
if Not IsEmpty(Request("Page")) then
Page = CInt(Request("Page"))
if Page > adors.PageCount then
adors.AbsolutePage = adors.PageCount
else if Page <= 0 then
Page = 1
else
adors.AbsolutePage = Page
end if
End if
Page = adors.AbsolutePage
%>
<table width="557" border="1" align="center" bordercolor="#0066FF">
<tr>
<td colspan="5"><div align="center"><span class="style3 style2">公司基本资料</span></div></td>
</tr>
<tr align="center">
<td><span class="style4">公司名称</span></td>
<td><span class="style4">公司地址</span></td>
<td><span class="style4">联系地址</span></td>
<td><span class="style4">联系电话</span></td>
<td><span class="style4">修改|删除</span></td>
</tr>
<%
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if
%>
<tr align="center">
<td><span class="style4">
<% =adors("gsmc") %>
</span></td>
<td><span class="style4">
<% =adors("gsdz") %>
</span></td>
<td><span class="style4">
<% =adors("lxdz") %>
</span></td>
<td><span class="style4">
<% =adors("lxdh") %>
</span></td>
<td><span class="style4"><a href="update.asp?id=<%=adors("id")%>">修改</a>|<a href="delete.asp?id=<%=adors("id")%>">删除</a></span></td>
</tr>
<%
adors.movenext
loop
%>
</table>
<div align="center">
<%
adors.close
set adors=nothing
adoconn.close
set adoconn=nothing
%>
<%if request("page")>1 then%>
<a Href="view.asp?Page=<% = 1%>">首页</a>
<a Href="view.asp?Page=<% =request("page") -1 %>">上一页</a>
<%end if %>
<%if request("page")<>adors.pagecount then %>
<a Href="view.asp?Page=<% =request("page") + 1%>">下一页</a>
<a Href="view.asp?Page=<% = adors.PageCount%>">尾页</a> <p>
<% end if %>
<a href="index.htm">添加数据</a></div>
</body>
</html>