Hi,
I'm having problems passing an array from my vb dll to ASP.
My vb code looks like:
-----------------------------------------------------
Option explicit
Public Function AddStationArr(Stations As Variant) As Variant
Dim ArrTmp() as integer
'some code here using Stations. Stations is a ADODB.recordset, but it only works when I Declare is as variant.
ReDim ArrTmp(1,0)
'some code incl. a loop with Redim preserve ArrTmp
AddStationArr = ArrTmp
end function
-----------------------------------------------------
My asp code:
-----------------------------------------------------
Option explicit
dim Draw, ArrTmp, rst
Set Draw = server.createobject(Myproject.MyClass)
set rst = server.createobject(ADODB.recordset)
'some code here
ArrTmp = Draw.AddStationRst(rst)
'ArrTmp Does not contain an array here! It contains an unknown datatype. If I try to: ArrTmp(0,0) I get and error: "ArrTmp: Unknown datatype."
-----------------------------------------------------
What am I doing wrong?
Sunaj
I'm having problems passing an array from my vb dll to ASP.
My vb code looks like:
-----------------------------------------------------
Option explicit
Public Function AddStationArr(Stations As Variant) As Variant
Dim ArrTmp() as integer
'some code here using Stations. Stations is a ADODB.recordset, but it only works when I Declare is as variant.
ReDim ArrTmp(1,0)
'some code incl. a loop with Redim preserve ArrTmp
AddStationArr = ArrTmp
end function
-----------------------------------------------------
My asp code:
-----------------------------------------------------
Option explicit
dim Draw, ArrTmp, rst
Set Draw = server.createobject(Myproject.MyClass)
set rst = server.createobject(ADODB.recordset)
'some code here
ArrTmp = Draw.AddStationRst(rst)
'ArrTmp Does not contain an array here! It contains an unknown datatype. If I try to: ArrTmp(0,0) I get and error: "ArrTmp: Unknown datatype."
-----------------------------------------------------
What am I doing wrong?
Sunaj