我是善财童子转世:asp分页源代码到底是哪错了?

来源:百度文库 编辑:高考问答 时间:2024/05/03 07:00:15
p=Trim(Request("page"))
cls=Trim(Request("clsid"))
tp="list.asp?clsid=" &cls
set pas= Server.CreateObject("adodb.recordset")
if cls<>"" then
if isnumeric(cls) then
passtr= "select * from [passage] where ind=true and class_id="&cls&" order by pub_time desc"
else
Response.Redirect("err.asp?action=err&text=请不要提交非法参数!")
end if
else
passtr= "select * from [passage] where hot=true order by pub_time desc"
end if
pas.open passtr,conn,1,1
pas.pagesize=15
if isnumeric(p) then
if p > pas.pagecount or p<0 then
cur=1
else
cur=fix(p)
end if
else
cur = 1
end if
pas.absolutepage=cur
totle=pas.recordcount

pas.open passtr,conn,1,1
--------------------------
该行的conn从哪来?其他的问题不大