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

来源:互联网 发布:tensorflow 朴素贝叶斯 编辑:程序博客网 时间:2024/06/05 08:00

例子:
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)

原创粉丝点击