我在使用ASP+COM时遇到了下面两个问题
1、com+用一个ByRef的变体参数返回一个数组,但在ASP中无法取得数组的内容。
ASP code:
set a=CreateObject("ClassName")
dim b
a.get b
response.write b(1) 这句话出错
COM+ code:
Public Function get(ByRef b as Variant) as Long
dim tmp(1) as String
tmp(1)="11111"
b=tmp
get=0
end function
2、由于第一个问题我使用Collection来传递数据,这样由COM+到ASP没问题了,但是在ASP中无法声明一个Collection实体,这是为何?
望前辈教诲
请把你的
COM+ code:
dim tmp(1) as String
改为
dim tmp(1)
就好了
在ASP中只支持宽松定义