高手(遇到过无效的过程调用或参数: 'Right'问题者)进来看看,高分相送!!马上给分!!

lirenjun119 2004-11-14 11:49:09
报这个错误:
Microsoft VBScript 运行时错误 错误 '800a0005' ,无效的过程调用或参数: 'Right'
部分代码:
<td align="center"><%
set tt=conn.execute("select bslcid from bjsl where bslcid='"&rs("id")&"' ")
bslcid=left(tt("bslcid"),len(tt("bslcid"))-1)
bslcid=right(bslcid,len(bslcid)-1)----------------出错地方
bslcid=replace(bslcid,"|",",")
if instr(bslcid,",")>0 then
set tt=conn.execute("select bsmc from bslc where id in ("&bslcid&")")
else
set tt=conn.execute("select bsmc from bslc where id="&bslcid)
end if
deptname=""
while not tt.eof
deptname=deptname&tt("bsmc")&"、"
tt.movenext
wend
deptname=left(deptname,len(deptname)-1)
response.write deptname
%></td>
...全文
184 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lhzongji 2004-11-14
  • 打赏
  • 举报
回复
字符串长度不可取。
rainxiang 2004-11-14
  • 打赏
  • 举报
回复
to whb147(dodo)
你动作太快。。。
可恶。。呵呵 ^_^
rainxiang 2004-11-14
  • 打赏
  • 举报
回复
如:
<%
aa="asdfa"
response.write right(aa,-1)
%>

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

无效的过程调用或参数: 'right'
whb147 2004-11-14
  • 打赏
  • 举报
回复
bslcid=right(bslcid,len(bslcid)-1)----------------出错地方

根据经验是:
有可能是bslcid的长度为0,
也就是说,bslcid值为空
呵呵,你的代码不够严谨,没有错误判断处理,呵呵
见笑了,有时候我自己也这样
……
rainxiang 2004-11-14
  • 打赏
  • 举报
回复
response.write len(bslcid) 出来看看。。

28,391

社区成员

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

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