当前位置: 代码迷 >> vbScript >> 又是一个下标有关问题,求高手解答
  详细解决方案

又是一个下标有关问题,求高手解答

热度:3738   发布时间:2013-02-26 00:00:00.0
又是一个下标问题,求高手解答!
运行这段代码的时候 提示下标越界 

<% 
  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 "), "|") 

  相关解决方案