Problem accessing Array

G

Guest

Hello,

I have a dll that is created in visual studio 2003 with VB .NET.
In this dll I am returning an object that in turn contains a methods
that can return an array of ojbect.

When I build a test client in a VB, it all works fine. However, when I
try to use the same dll in an ASP VBScript app, I run into strange
problems. Test code reveals that the first object is returning an
array. But when I try to access userGrpAry(0), then it always returns
the following error:

Microsoft VBScript runtime (0x800A000D)
Type mismatch
/idmTestApp/Default.asp, line 32

The sample code is below. Any idea on how I can work base this? It
seems to be an iteroperability issue between .net and the non-.net
world.

Regards
Leslie


Dim auth, SSOSubject
Dim userGrpAry
Dim grpVal


Set auth = Server.CreateObject("idmVBApi.­ComAuthenticate")
set grpVal = CreateObject("idmVBApi.GroupVa­lue")
response.write " GrpVal type = " & typeName(grpVal) & "<br>"


set SSOSubject = auth.Authenticate("200", "tlogin1", "tlogin1")
response.write "Result Code = " & ssoSubject.resultCode & "<br>"


userGrpAry = ssoSubject.getUserGroups()
response.write "Group Ary is array = " & isArray(userGrpAry)
response.write "Group Ary upper bound = " & UBound(userGrpAry)
response.write "Group Ary lower bound = " & lbound(userGrpAry)


response.write " UserGrpAry type = " & TypeName(userGrpAry)
response.write " UserGrpAry Vartype = " & VarType(userGrpAry)
response.write " GroupValue Vartype = " & VarType(grpVal) & "<br>"


' line that fails.
response.write " UserGrp in Ary = " & VarType(userGrpAry(0))


Thanks in advance for your help.
Leslie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top