又是一个下标问题,求高手解答!
运行这段代码的时候 提示下标越界
<%
if isnull(trim(rs( "WS_FlowDocAnnex "))) then
response.write "没有附件 "
else
dim FlowDocAnnexArr,FlowDocAnnexNameArr
FlowDocAnnexArr=split(rs( "WS_FlowDocAnnex "), "| ")
FlowDocAnnexNameArr=split(rs( "WS_FlowDocAnnexName "), "| ")
for i=0 to ubound(FlowDocAnnexArr)-1
response.Write " <a href= '../HXINCLUDE/DownFile.ASP?Path= "&WS_S.UrlEncoded(trim(FlowDocAnnexArr(i)))& " target= '_blank '> <img src=../hximages/Message/sign.gif border=0> " & "附件 " & FlowDocAnnexNameArr(i) & " </a> " & " "
next
end if
%>
错误代码:Microsoft VBScript 运行时错误 错误 '800a0009' 下标越界: '50'
求高手解答如何解决!
[解决办法]
FlowDocAnnexArr=split(rs( "WS_FlowDocAnnex "), "|不要空格")
FlowDocAnnexNameArr=split(rs( "WS_FlowDocAnnexName "), "|不要空格")
改为
FlowDocAnnexArr=split(rs( "WS_FlowDocAnnex "), "|")
FlowDocAnnexNameArr=split(rs( "WS_FlowDocAnnexName "), "|")