asp_components thread: Arrays in ASP?
Message #1 by Ugo Bachetti <ubachetti@h...> on Tue, 5 Sep 2000 12:55:13 -0400
|
|
Can anyone help me?
I created a component in VB 6.0 that returns a list of names
(multi-dimensional variant array) from an SQL database. When I call the
event to get the names in VB everything works fine. When I call this event
in ASP I get the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
Is there anything that must be done when using Multi-dimensional arrays?
My ASP Code:
Dim vProvince(10)
Dim objBOStores
Set objBOStores = Server.CreateObject("HartsBO.clsBOProvinces")
vProvince = objBOStores.GetAllProvincesWithStores()
(This returns a multi-dimensional variant array)
P.S. Error occurs on this line
Thanks in Advance
Ugo
Message #2 by "Dana Coffey" <dcoffey@x...> on Tue, 5 Sep 2000 16:03:49 -0400
|
|
Don't you need to pass a connection string as a parameter instead of empty
()?
Dana Coffey
Technologist, Xceed, Inc.
112 Krog St. Atlanta, GA 30307
tel. xxx-xxx-xxxx x 5013
www.xceed.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Everything should be as simple as it is, but not simpler.
----Albert Einstein
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{{-----Original Message-----
{{From: Ugo Bachetti [mailto:ubachetti@h...]
{{Sent: Tuesday, September 05, 2000 11:58 PM
{{To: ASP components
{{Subject: [asp_components] Arrays in ASP?
{{
{{
{{
{{Can anyone help me?
{{I created a component in VB 6.0 that returns a list of names
{{(multi-dimensional variant array) from an SQL database. When I call the
{{event to get the names in VB everything works fine. When I call
{{this event
{{in ASP I get the following error:
{{
{{Microsoft VBScript runtime error '800a000d'
{{Type mismatch
{{
{{Is there anything that must be done when using Multi-dimensional arrays?
{{
{{My ASP Code:
{{
{{Dim vProvince(10)
{{Dim objBOStores
{{Set objBOStores = Server.CreateObject("HartsBO.clsBOProvinces")
{{
{{vProvince = objBOStores.GetAllProvincesWithStores()
{{(This returns a multi-dimensional variant array)
{{P.S. Error occurs on this line
{{
{{Thanks in Advance
{{
{{Ugo
{{
Message #3 by Christian Cruz <chris_cruz1@y...> on Tue, 5 Sep 2000 12:59:24 -0700 (PDT)
|
|
Try just:
Dim vProvince
instead of
Dim vProvince(10)
It's a variant anyway. After the call to the vb
component try accesing it as a nomal array.
Let me know if it works
Chris C.
--- Ugo Bachetti <ubachetti@h...> wrote:
>
> Can anyone help me?
> I created a component in VB 6.0 that returns a list
> of names
> (multi-dimensional variant array) from an SQL
> database. When I call the
> event to get the names in VB everything works fine.
> When I call this event
> in ASP I get the following error:
>
> Microsoft VBScript runtime error '800a000d'
> Type mismatch
>
> Is there anything that must be done when using
> Multi-dimensional arrays?
>
> My ASP Code:
>
> Dim vProvince(10)
> Dim objBOStores
> Set objBOStores
> Server.CreateObject("HartsBO.clsBOProvinces")
>
> vProvince = objBOStores.GetAllProvincesWithStores()
>
> (This returns a multi-dimensional variant array)
> P.S. Error occurs on this line
>
> Thanks in Advance
>
> Ugo
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
Message #4 by Fredrik Normen <fredrik.normen@e...> on Wed, 6 Sep 2000 08:46:24 +0200
|
|
Try to remove (10) from this line
Dim vProvince(10)
/Fredrik N
-----Original Message-----
From: Ugo Bachetti
Sent: den 6 september 2000 05:58
To: ASP components
Subject: [asp_components] Arrays in ASP?
Can anyone help me?
I created a component in VB 6.0 that returns a list of names
(multi-dimensional variant array) from an SQL database. When I call the
event to get the names in VB everything works fine. When I call this event
in ASP I get the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
Is there anything that must be done when using Multi-dimensional arrays?
My ASP Code:
Dim vProvince(10)
Dim objBOStores
Set objBOStores = Server.CreateObject("HartsBO.clsBOProvinces")
vProvince = objBOStores.GetAllProvincesWithStores()
(This returns a multi-dimensional variant array)
P.S. Error occurs on this line
Thanks in Advance
Ugo
|