出现这个问题怎么解决?

realjoshzuo 2003-06-27 11:42:26
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/sort_view.asp, 第 142 行


代码:
set rs_1=server.createobject("adodb.recordset")
sql="select * from big_sort where big_sort_id="&cstr(big_sort_id)
rs_1.open sql,conn,1,1---------第 142 行
if not rs_1.eof then
big_sort_name=rs_1("big_sort_name")
end if
rs_1.close
...全文
20 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
超级大笨狼 2003-06-27
  • 打赏
  • 举报
回复
big_sort_id='" & big_sort_id & "'"
rs_1.open sql,conn,3,2
不容易出错
&符号前后要注意空格
realjoshzuo 2003-06-27
  • 打赏
  • 举报
回复

big_sort_id是长整形

我已经改
sql="select * from big_sort where big_sort_id='"&big_sort_id&"'"

还是一样
xiaobird1 2003-06-27
  • 打赏
  • 举报
回复
同意楼上
DreamLixh 2003-06-27
  • 打赏
  • 举报
回复
set rs_1=server.createobject("adodb.recordset")
big_sort_id=cstr(big_sort_id)
sql="select * from big_sort where big_sort_id='"&big_sort_id&"'"
rs_1.open sql,conn,1,1---------第 142 行
if not rs_1.eof then
big_sort_name=rs_1("big_sort_name")
end if
rs_1.close

你试试这样看看可不可以阿,我估计是数据库中big_sort_id不是整型的吧
weizhihui1213 2003-06-27
  • 打赏
  • 举报
回复
同意楼上的说法
zhxhjj 2003-06-27
  • 打赏
  • 举报
回复
一般是cstr(big_sort_id)值为空,或big_sort或big_sort_id表或字段不存在,
再不行,看一下CONN的数据库连接有没有问题
lsrzm 2003-06-27
  • 打赏
  • 举报
回复
sql="select * from big_sort where big_sort_id='"&cstr(big_sort_id)&"'"
rs_1.open sql,conn,3,1

Reker熊 2003-06-27
  • 打赏
  • 举报
回复
如果big_sort_id是整型
sql="select * from big_sort where big_sort_id="&cint(big_sort_id)

如果是字符型
sql="select * from big_sort where big_sort_id='"&cstr(big_sort_id)&"'"

28,390

社区成员

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

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