哪位哥哥姐姐帮我看看?rs.open session("sql"),conn,0,1
<%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等具体表示什么含义可以深入的解释一下,
再次感谢!