473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem accessing Array

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

Nov 19 '05 #1
0 738

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
13
by: Ian Tuomi | last post by:
Could anyone please tell me what is wrong with this code? Compiler error is: "parse error before '.' token" in lines 13-16. I tried searching the internet but all the reference guides etc. say It's...
5
by: Denis C | last post by:
Hi, I posted this earlier today with no help. I'm trying agin as I am desparate(sp?). Hi there, I'm trying to convert part of a byte array into a series of fixed length strings but half...
6
by: Tom | last post by:
I have a problem, to which I have been unable to find a solution for days now, after checking numerous references (both in books and online). Perhaps someone here can help. Here's my problem: ...
4
by: Leszek | last post by:
Hi. I have a problem with a form. There are some select dropdown lists for($i=0;$i<=$nrooms;$i++) { echo "<option value=\"$i\""; if($_POST]==$i){ // $k is incremented in other loop
39
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1)...
22
by: roadrunner | last post by:
Hi, Our website has recently been experiencing some problems under load. We have pinpointed a particular function which slows dramatically when we have these problems. Normally it should execute...
3
Digital Don
by: Digital Don | last post by:
I have a problem sending the Vectors as Referencial parameters..i.e. I am having a struct vector struct board { int r; int c; };
5
by: weidongtom | last post by:
Hi, I tried to implement the Universal Machine as described in http://www.boundvariable.org/task.shtml, and I managed to get one implemented (After looking at what other's have done.) But when I...
43
by: John | last post by:
Hi This .net is driving me crazy!! In VB6 I had a type which contained a couple of multi-dimentional arrays which i used to create and read records: Type AAA : Array1(10,10,2) as Integer
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.