请高手帮我看看代码,我该如何修改才能达到预期的效果?
<html>
<head>
<TITLE></TITLE>
</head>
<body bgcolor="#FFFFFF">
<font size="2">查询<b><font color=red>出入库</font></b>数据:
<font size="2">
<!--#INCLUDE file="ADOVBS.INC" -->
<%
form_text=request.form("text")
if form_text="" then
form_text=request.querystring("name")
end if
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("database.mdb")
sqltemp="select * from deposit where 名称 like '%"&form_text&"%' order by id desc"
set rstemp=server.CreateObject("ADODB.Recordset")
set rs=conn.execute(sqltemp)
%>
<font color=red><b>现在是:</b></font><%=now%> <a href="./depositinfo.asp">返回</a><hr>
<%
if rs.eof or rs.bof then
%>
<%
response.write "数据库中无此数据"
%>
<%else%>
<%
scriptresponder="depositinfo_edit.asp"
scriptdel="depositinfo_del.asp"
IDfield="id"
mypage=request.querystring("whichpage")
if mypage=0 then
mypage=1
end if
mypagesize=request.querystring("pagesize")
if mypagesize=0 then
mypagesize=20
end if
rstemp.cursorlocation=aduseclient
rstemp.cachesize=5
rstemp.open sqltemp,conn
rstemp.movefirst
rstemp.pagesize=mypagesize
maxcount=cint(rstemp.pagecount)
rstemp.absolutepage=mypage
howmanyrecs=0
howmanyfields=rstemp.fields.count-1
response.write "页" & mypage &
"/"
& maxcount
%>
共计 <font color=red><b><%response.write rstemp.RecordCount%></b></font> 条记录
每页:<font color="#FF0000"><b><%response.write rstemp.pagesize%></b> </font>条</font>
<hr>
<table border=1 bordercolor=gray>
<tr>
<td valign=top><font size="2">----</font></td>
<td valign=top><font size="2">----</font></td>
<%
for i=0 to howmanyfields
%>
<td><b>
<font size="2">
<%=rstemp(i).name%>
</font>
</b></td>
<%next%>
</tr>
<%
do while not rstemp.eof and howmanyrecs < rstemp.pagesize
%>
<tr>
<td valign=top>
<font size="2">
<%
my_link=scriptresponder&"?which=" & rstemp(idfield)
%><a href="<%=my_link%>">编辑</a>
</font>
</td>
<td valign=top>
<font size="2">
<%
my_del=scriptdel&"?which=" & rstemp(idfield)
%><a href="<%=my_del%>">删除</a>
</font>
</td>
<%
for i=0 to howmanyfields
%>
<td valign=top><font size="2"><%=rstemp(i)%></font></td>
<%next%>
</tr>
<%
rstemp.movenext
howmanyrecs=howmanyrecs+1
loop
rstemp.close
set rstemp=nothing
%>
<tr>
<td colspan=2 bgcolor=red align=center><font size=2><b>总计</b></font></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td>
<td><font color=red size=2><input type=hidden name=rklzh value="">
<%
sumsql="select sum(入库量) from deposit where 名称 like '%"&form_text&"%' "
set sum=Server.CreateObject("adodb.recordset")
sum.open sumsql,conn
sumrk=sum(0)
sumrks=round(sumrk,3)
response.write sumrks
sum.close
set sum=nothing
%>
</font></td>
<td><font color=red size=2>
<%
sumsql="select sum(出库量) from deposit where 名称 like '%"&form_text&"%' "
set sum=Server.CreateObject("adodb.recordset")
sum.open sumsql,conn
sumck=sum(0)
sumcks=round(sumck,3)
response.write sumcks
sum.close
set sum=nothing
%>
</font></td>
<td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td><td bgcolor=gray></td>
</tr></table>
<p>
<font size="2">
<%
pad="0"
scriptname=Request.ServerVariables("script_name")
for counter=1 to maxcount
if counter>=10 then
pad=""
end if
ref="<a href='" & scriptname & "?whichpage="& counter
ref=ref & "&name=" & form_text
& "'>"& pad & counter &"</a>"
response.write ref & " "
if counter mod 10 = 0 then
response.write "<br>"
end if
next
%>
</font>
</p>
</body>
</html>