
Problem passing a variant array out of VBasic object to ASP
I've done something silly here but can't quite figure it out. I sure would
appreciate it if someone would be good enough to point out the error.
In an ASP file, I have an empty array. This empty array is passed to a
VBasic created COM object that fills the array and then that object returns
the number of rows it put into the array. That's the theory, anyway. The
reality is
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'objBilling.RetrieveIncompleteOrders'
Here's the code in the calling ASP file (bits have been snipped for
brevity):
Dim aryLogin : aryLogin = Session("s_aryLogin")
dim aryIncompleteOrders()
dim iIncompleteOrders
.
.
Set objBilling = Server.CreateObject("Checkerboard.CBilling")
iIncompleteOrders = objBilling.RetrieveIncompleteOrders( aryLogin,
aryIncompleteOrders )
.
.
Here's the code in the called VBasic CLS file:
Public Function RetrieveIncompleteOrders(ByVal aryCust As Variant, ByRef
aryIncompleteOrders() As Variant) As Variant
ReDim aryIncompleteOrders(0 To 3, 0 To 2)
aryIncompleteOrders(0, 0) = "CELL_0_0"
aryIncompleteOrders(0, 1) = "CELL_0_1"
aryIncompleteOrders(0, 2) = "CELL_0_2"
aryIncompleteOrders(1, 0) = "CELL_1_0"
aryIncompleteOrders(1, 1) = "CELL_1_1"
aryIncompleteOrders(1, 2) = "CELL_1_2"
aryIncompleteOrders(2, 0) = "CELL_2_0"
aryIncompleteOrders(2, 1) = "CELL_2_1"
aryIncompleteOrders(2, 2) = "CELL_2_2"
aryIncompleteOrders(3, 0) = "CELL_3_0"
aryIncompleteOrders(3, 1) = "CELL_3_1"
aryIncompleteOrders(3, 2) = "CELL_3_2"
RetrieveIncompleteOrders = UBound(aryIncompleteOrders, 1) + 1
End Function
=================================================
1 + 1 = 3 for sufficiently large values of 1.
Richard Lewis Haggard