asp自定义函数可以返回数组或者对象
例子:
functionGetAuditorInfoBySeqNo(filenostr,strSeqNo)
DimauditorInfo(3)
sqltext="selectauditorfromfileauditwhereFileNO='"&filenostr&"'andseqNo='"&strSeqNo&"'"
setrs_auditor=conn.Execute(sqltext)
ifnotrs_auditor.eofthen
employeeid=rs_auditor("auditor")
sqltext="select*fromemployeewhereid="&employeeid
setrs_em=conn.Execute(sqltext)
auditorInfo(1)=rs_em("ID")
auditorInfo(2)=rs_em("en_Name")
auditorInfo(3)=rs_em("mail")
endif
GetAuditorInfoBySeqNo=auditorInfo
endfunction
AuditorInfo=GetAuditorInfoBySeqNo(file_No,2)
Response.writeAuditorInfo(1)