asp 加了这段分页代码就出错,是什么原因

来源:百度知道 编辑:UC知道 时间:2024/05/08 05:17:13
我是用asp写的连接unix系统下的informix数据库里的数据,没有加那段分页代码的时候没有错,但是加了后就出错,请高手帮帮忙,帮忙看下是什么原因
<%if request.Form("submit")="确定" then
usercode=request.Form("usercode")
password=request.Form("password")

Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open "dsn=dxpt1;uid=dxpt;pwd=dxpt2007"
sql="select * from yhdm as y where y.usercode='"&usercode&"' and y.password='"&password&"'"
set rs=conn.execute(sql)
yhdm_comcode=rs("comcode1")
Dim x
x = Left(Cstr(yhdm_comcode),4)
response.Write x
sql2="select * from cx_ylws where comcode matches '"&x&"*'"
response.Write sql2
sql3="select * from cx_ylws where comcode like '35080010%'"
Set rst=Server.CreateObject

两个do怎么才1个loop?

do while not rst.eof 的位置不对,就在分页设置后面。

<%if request.Form("submit")="确定" then
usercode=request.Form("usercode")
password=request.Form("password")

Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open "dsn=dxpt1;uid=dxpt;pwd=dxpt2007"
sql="select * from yhdm as y where y.usercode='"&usercode&"' and y.password='"&password&"'"
set rs=conn.execute(sql)
yhdm_comcode=rs("comcode1")
Dim x
x = Left(Cstr(yhdm_comcode),4)
response.Write x
sql2="select * from cx_ylws where comcode matches '"&x&"*'"
response.Write sql2
sql3="select * from cx_ylws where comcode like '35080010%'"
Rst.Open Sql3,conn,1,1
if rst.recordco