找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 91|回复: 6

又来求助地。。赐教

[复制链接]
发表于 2010-1-19 02:50:15 | 显示全部楼层 |阅读模式 IP:江苏扬州
大家看我写的判断搜索的代码:实现的功能是判断搜索类型,并接受从表单传来的内容,进行搜索。
if request("stype")=singer then
sql="select * from nclass where nclass like '%"&request("keyword")&"%' order by nclassid desc"
elseif request("stype")=music then
sql="select * from musiclist where musicname like '%"&request("keyword")&"%' "
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1 /9行

if not isempty(request.QueryString("page")) then
currentpage=cint(request.QueryString("page"))
else
currentpage=1
end if

if rs.eof and rs.bof then
if request("stype")=singer then
response.Write"<p align='center'><br><br>Sorry,未找到你想要的歌手<br><br><a href="" javascript:history.go(-1)"">点此返回</a><br><br></p>"
elseif request("stype")=music then
response.Write"<p align='center'><br><br>Sorry,未找到你想要的歌曲<br><br><a href="" javascript:history.go(-1)"">点此返回</a><br><br></p>"
end if
else
totalput=rs.recordcount
maxperpage=10
pageurl="search.asp"
if currentpage<1 then currentpage=1
if(currentpage-1)*maxperpage>totalput then
if (totalput mod maxperpage)=0 then
currentpage= totalput \ maxperpage
else
currentpage= totalput \ maxperpage+1
end if
end if
if currentpage=1 then
showpage totalput,maxperpage,pageurl
showcontent
showpage totalput,maxperpage,pageurl
else
if (currentpage-1)*maxperpage<totalput then
rs.move(currentpage-1)*maxperpage
dim bookmark
bookmark=rs.bookmark
showpage totalput,maxperpage,pageurl
showcontent
showpage totalput,maxperpage,pageurl
else
currentpage=1
showpage totalput,maxperpage,pageurl
showcontent
showpage totalput,maxperpage,pageurl
end if
end if
rs.close
end if
%>

问题是:运行后总是报这样的错--
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/search.asp, 第 9 行

我找了半天都看不出原因何在
望哪位帮帮me
谢了
发表于 2010-1-19 02:50:19 | 显示全部楼层 IP:江苏扬州
将生成的sql语句输出 看一下
回复

使用道具 举报

发表于 2010-1-19 02:50:22 | 显示全部楼层 IP:江苏扬州
输出没问题
这段单独运行正常
和主页上面连起来后就报这样的问题
回复

使用道具 举报

发表于 2010-1-19 02:50:26 | 显示全部楼层 IP:江苏扬州
主页传的值stype、keyword,都没写错?都有值?
回复

使用道具 举报

发表于 2010-1-19 02:50:30 | 显示全部楼层 IP:江苏扬州
有值
我把全部的错误信息发给你看看

技术信息(用于支持人员)
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/search.asp, 第 10 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Poco 0.31; Maxthon; Alexa Toolbar) 网页:
POST 36 ??? /search.asp POST Data:
stype=Music&keyword=&I3.x=24&I3.y=11 时间:
2005年12月27日, 下午 07:33:48 详细信息:
Microsoft 支持
红的那行显示的是有值的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 05:25 , Processed in 0.322398 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表