哪位哥哥姐姐帮我看看?rs.open session("sql"),conn,0,1

mydream222 2005-09-06 10:46:59
<%if request.querystring("search")="1" then
if trim(request("finddata"))="" or trim(request("finddata"))="联系人或位置" then
s_finddata="%"
else
s_finddata=trim(request("finddata"))
end if

if trim(request("brand"))="" or trim(request("brand"))="品牌名称" then
s_brand="%"
else
s_brand=trim(request("brand"))
end if

if trim(request("typeid"))="" then
s_typeid="%"
else
s_typeid=trim(request("typeid"))
end if

if trim(request("marketid"))="" then
marketid="%"
else
marketid=trim(request("marketid"))
end if
typeid=s_typeid
brand=s_brand
////sql = "select* from production,shop where shop.id=production.shopid and (shop.linkman like '%"&s_finddata&"%' or shop.floor like '%"&s_finddata&"%' or shop.stall like '%"&s_finddata&"%') and shop.marketid like '"&marketid&"' and typesid like '"&s_typeid&"' and brand like '"&s_brand&"' and production.temp2 like '0' order by shop.topshop desc,production.id desc"

else
if request.QueryString("strclass")="1" then

typeid=request("typeid")

////sql = "select * from shop,production where shop.id=production.shopid and production.typesid like '"&typeid&"' and production.temp2 like '0' order by shop.topshop desc,production.id desc"
else
marketid=request.querystring("marketid")

///sql = "select * from production,shop where shop.id=production.shopid and production.temp2 like '0' and shop.marketid like'"&marketid&"' order by shop.topshop desc,production.id desc"

end if
end if
session("sql")=sql
if typeid="%" or typeid="%25" or typeid="" then
session("typeid")=0
else
session("typeid")=typeid
end if
if marketid="%" or marketid="%25" then
session("marketid")=0
else
session("marketid")=marketid
end if


set rs = server.createobject("adodb.recordset")
msg_per_page =14'定义每页显示记录条数
rs.cursorlocation = 3 '使用客户端游标,可以使效率提高
rs.pagesize = msg_per_page '定义分页记录集每页显示记录数

'rowcount = rs.pagesize

rs.open session("sql"),conn,0,1
%>
1.对于其中的rs.open session("sql"),conn,0,1,
如果我把session("sql")直接换成sql语句,按照不同的查询条件查询符合要求的数据,首页显示的内容没有什么问题,如果翻到下一页的时候将发生

错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

我的页面没有改变,只是在翻页,直接用sql,应该不会失去SQL语句吧
请各位知道的发表一下看法,本人不胜感激!
2.对于通配符 % ,%25等具体表示什么含义可以深入的解释一下,
再次感谢!

...全文
88 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

你用response.write session("sql") 试试就知道了
mydream222 2005-09-06
  • 打赏
  • 举报
回复
如果我用RS.open sql,conn,0,1
进入分页显示下一页的时候页面根本不显示,用了这个response.write session("sql") 也看不到啊,

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧