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

时间:2022-06-04 00:21:59
报这个错误:
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>

5 个解决方案

#1


response.write len(bslcid) 出来看看。。

#2


bslcid=right(bslcid,len(bslcid)-1)----------------出错地方

根据经验是:
有可能是bslcid的长度为0,
也就是说,bslcid值为空
呵呵,你的代码不够严谨,没有错误判断处理,呵呵
见笑了,有时候我自己也这样
……

#3


如:
<%
aa="asdfa"
response.write right(aa,-1)
%>

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

无效的过程调用或参数: 'right' 

#4


to whb147(dodo)
你动作太快。。。
可恶。。呵呵 ^_^

#5


字符串长度不可取。

#1


response.write len(bslcid) 出来看看。。

#2


bslcid=right(bslcid,len(bslcid)-1)----------------出错地方

根据经验是:
有可能是bslcid的长度为0,
也就是说,bslcid值为空
呵呵,你的代码不够严谨,没有错误判断处理,呵呵
见笑了,有时候我自己也这样
……

#3


如:
<%
aa="asdfa"
response.write right(aa,-1)
%>

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

无效的过程调用或参数: 'right' 

#4


to whb147(dodo)
你动作太快。。。
可恶。。呵呵 ^_^

#5


字符串长度不可取。