473,387 Members | 1,844 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,387 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.GroupValue")
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 21 '05 #1
1 898
Leslie,

FYI did you know that in this newsgroup bellow you have a much better change
on an answer.

Aspnet
news://msnews.microsoft.com/microsof...amework.aspnet

Web interface:
http://communities2.microsoft.com/co...amework.aspnet

This kind of coding is not normally done by most people in this dotnet
language VB newsgroup.

Does not mean that you are not welcome here.

Cor
Nov 21 '05 #2

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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.