Microsoft VBScript 运行时错误 错误 '800a005e'

qq_38658253 2017-06-07 06:38:20
打开asp显示:
Microsoft VBScript 运行时错误 错误 '800a005e'

无效使用 Null: 'cstr'

/yyxx_ylyManage.asp,行 115
请问是什么原因?怎么修改?
代码如下:
<%
Set rsjly = Server.CreateObject("ADODB.Recordset")
rsjly.open "select sum(js) from yy_tjxhz where Bigclassname<>'' and sfly=true and lyDate=#"&date()&"#",conn

response.write cstr(rsjly(0))
rsjly.close
%>
...全文
298 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Go 旅城通票 2017-06-08
  • 打赏
  • 举报
回复
if request.name="" then 不要乱用属性,获取提交的值用querystring或者form对象,或者直接request("xxx") 自己找本基础的asp书来看
qq_38658253 2017-06-08
  • 打赏
  • 举报
回复
引用 1 楼 showbo 的回复:
数据库null不能用cstr,直接输出就行了,不需要cstr,你要转字符串连接空字符串也不会报错 response.write rsjly(0)&""
谢谢 好了,这个问题还想请教一下,刚学asp Microsoft VBScript 运行时错误 错误 '800a01b6' 对象不支持此属性或方法: 'name' /yyxx_ylyManage.asp,行 285 代码如下: <% if request.name="" then response.write "所有信息" else if request("name")<>"" then if name<>"" then response.write "名称中含有“<font color=blue>" & name & "</font>”的信息" else response.Write("所有信息") end if else if BigClassName<>"" then response.write "<a href='yyxx_ylymanage.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> " if SmallClassName<>"" then response.write "<a href='yyxx_ylymanage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>" else response.write "所有小件" end if end if end if end if %>
hookee 2017-06-08
  • 打赏
  • 举报
回复
写成cstr(rsjly(0).value),表明是值,不是field对象。输出看下rsjly(0)的值是什么。
Go 旅城通票 2017-06-07
  • 打赏
  • 举报
回复
数据库null不能用cstr,直接输出就行了,不需要cstr,你要转字符串连接空字符串也不会报错 response.write rsjly(0)&""

28,390

社区成员

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

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