asp中怎样实现翻页 可以读到数据库就是把数据库里的内容抓不出来

来源:百度知道 编辑:UC知道 时间:2024/06/07 23:04:54
dim leixing
dim kemuming
dim zdda
dim ndda
ndda=request.Form("radio")
zdda=request.form("tijiaodaan")
leixing=request("lx")
kemuming=request("mcc")

if leixing="" or leixing="ln" or leixing=empty then
leixing="dc"
else
lexing="duox"
end if
if kemuming="" or kemuming=empty or kemuming="yw" then kemuming="yw"
if kemuming="yy" then kemuming="yy"
if kemuming="ls" then kemuming="ls"
set rst=server.createobject("adodb.recordset")
strsql="select * from stutest where change='"+leixing+"' and kemu='"+kemuming+"' order by id"
rst.open strsql,conn,1
if rst.RecordCount>0 then
'设置Recordset对象的pagesize属性的值,来控制每页显示的记录数目
rst.pagesize=1

你的报错是什么?
把你的SQL语句在数据库里单独的查一下,能查出结果吗?
change='"+leixing+"' and kemu='"+kemuming+"'
给它们直接赋值看一下!

rst.open strsql,conn,1
应为
rst.open strsql,conn,1,1