asp查询数据分页,不成功

lukelukelukelukeluke lukelukelukelukeluke 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<html>
<head>
<link rel=stylesheet type=text/css href=asp.css>
</head>
<body>

<table align="center" border="0">
<tr>
<td><!--#include file="top.asp"--></td>
</tr>
</table>
<table align="center" border="0">
<form method="post" action="ckcx.asp"name="form1">
<tr>
<td colspan="8" align="center" bgcolor="#609B95"><strong>出 库 信 息 查 询</strong></td>
</tr>
<tr>
<td width="100"><div align="center">编号</div></td>
<td width="100"><div align="center">出库编号</div></td>
<td width="100"><div align="center">材料名称</div></td>
</tr>
<tr>
<td><input name="bh" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="ckbh" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="clmc" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input type="submit" name="ckc" value="查"></td>
</tr>
</form>
</table>
<%
if request("ckc")="查" then
if request("bh")<>""then
if cond="" then
cond="编号 like '%" & trim(request("bh")) & "%'"
else
cond = cond & " AND 编号 like '%" & trim(request("bh")) & "%'"
end if
end if
if request("ckbh")<>""then
if cond="" then
cond="出库编号 like '%" & trim(request("ckbh")) & "%'"
else
cond = cond & " AND 出库编号 like '%" & trim(request("ckbh")) & "%'"
end if
end if
if request("clmc")<>"" then
If cond="" Then
cond="材料名称 like '%" & trim(request("clmc")) & "%'"
else
cond = cond & "and 材料名称 like '%" & trim(request("clmc")) & "%'"
end if
end if
if cond<>""then
sql="select * from 出库表 where " & cond & "order by 日期"
else
sql="select * from 出库表 order by 日期"
end if
session("sql")=(sql)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
response.write "<table border='1' align='center' cellpadding='1' cellspacing='1'>"
response.write "<tr>"
response.write "<th>编号</th> <th>出库编号</th> <th>日期</th> <th>材料名称</th> <th colspan='2'><a href='dc1.asp'>导出查询数据</a></th>"
response.write "</tr>"
%>
<tr><td colspan="12" class="wzjz">共有记录<%=rs.recordcount%>条</td></tr>
<%
do while not rs.eof
%>
<tr onMouseOver="this.bgColor='#99ccff'" onMouseOut="this.bgColor=''">
<td><input type="text" name="bh" class="xswb" readonly="true" size="12" value=<%=rs("编号")%>></td>
<td><input type="text" name="rkbh" class="xswb" readonly="true" size="10" value=<%=rs("出库编号")%>></td>
<td><input type="text" name="rq" class="xswb" readonly="true" size="10" value=<%=rs("日期")%>></td>
<td><input type="text" name="clmc" class="xswb" readonly="true" size="12" value=<%=rs("材料名称")%>></td>
<td class="wzjz" height="22" width=50><a href="ckxx.asp?id=<%=rs("id")%>" target="_blank">详细</a></td>
<td class="wzjz" height="22" width=50><a href="ckxg.asp?id=<%=rs("id")%>">修改</a></td>
<td class="wzjz" height="22" width=50><a onClick="return confirm('你确定要删除此记录吗?')" href="cksc_q.asp?id=<%=rs("id")%>">删除</a></td>
</tr>
<%
rs.MoveNext
loop
rs.Close
%>
</table>
<% end if %>
<body>
</html>

请哪位高手帮忙在以上代码中加一个带页码跳转历能的查询分页代码(带"1" "2" "3"…… 页码的链接跳转和带页码的下拉菜单跳转) 请在原代码上添加
非常感谢
...全文

相关推荐

ASP与Access数据库_Demo 登录 增删改 分页

在本Demo中,ASP被用来实现用户登录、数据的增删改查以及分页查询功能。

ak47zy

实现百度风格的ASP分页功能

分页是一种常见且至关重要的Web界面元素,它允许用户在大量数据集中导航,而无需一次性加载所有数据,从而提高了用户体验和页面的性能。随着互联网的发展,数据量呈指数级增长,分页技术变得越发关键。它不仅减少了服务器的负载,还能快速响应用户请求,提高系统的响应速度和用户体验。在展示一个完整的分页功能实现之前,我们首先需要了解ShowPage.asp的基本作用及其分页逻辑的流程。

Amarantine Lee

实现自动分页功能的ASP代码解析

在信息展示场景中,当内容量较大时,一次性加载所有数据会导致性能下降和用户体验恶化。分页,作为一种信息组织和展示的策略,将大量数据划分为较小、更易于管理的块。每一块数据被称为“一页”,用户可以通过分页功能在不同的数据页之间切换,从而只加载当前页面所需的数据。分页的主要作用在于:- 提高页面加载速度:仅加载当前页面的数据,减少网络传输量和服务器负载。- 改善用户体验:用户可以快速找到他们感兴趣的数据部分,而不是在大量数据中滚动或搜索。

未知方程 无解

ASP做的一个很好的分页类

**错误处理**:良好的分页类会包含适当的错误处理机制,如检查数据库连接是否成功,查询是否有语法错误等。8. **性能优化**:为了提高性能,避免一次性加载所有数据,而是在需要时按页加载。

kuangqiulei

asp+ajax实现静态页面分页的代码

总结来说,ASP+AJAX实现静态页面分页的关键在于使用AJAX进行异步请求,服务器端(ASP)处理数据库查询和分页,然后将结果返回给前端,前端通过JavaScript更新页面内容。

weixin_38623080
评论 3
收藏 已收藏
分享
返回顶部
lukelukelukelukeluke
ASP 28,401 成员 356,940 内容