asp自定义函数可以返回数组或者对象

asp自定义函数可以返回数组或者对象
例子:
function GetAuditorInfoBySeqNo(filenostr,strSeqNo)
  
Dim auditorInfo(3)
  sqltext 
= "select auditor from  fileaudit where FileNO='"&filenostr&"' and seqNo='"&strSeqNo&"'"
  set rs_auditor = conn.Execute(sqltext)
  
if not rs_auditor.eof then
    employeeid 
= rs_auditor("auditor")
 sqltext 
=" select * from employee where id="&employeeid
    
set rs_em = conn.Execute(sqltext)
 auditorInfo(
1= rs_em("ID")
 auditorInfo(
2= rs_em("en_Name")
 auditorInfo(
3= rs_em("mail")
  
end if
   GetAuditorInfoBySeqNo 
= auditorInfo
end function


AuditorInfo = GetAuditorInfoBySeqNo(file_No,2)
            Response.write AuditorInfo(
1)

posted on 2004-10-09 13:54  一望无际的南  阅读(4404)  评论(0编辑  收藏  举报

导航