Problem with reading array from ActiveX DLL
Hi
I have created a ActiveX DLL in VB6 that return a array. What the dll does is query a table and write the values to an array. I need to access this array to build my asp page dynamicly. To get the array from a VB6 form(as a test) I use:
******
Dim strings() As String
Dim i As Integer
' Get the array of strings.
strings = numberlist()
For i = LBound(strings) To UBound(strings)
If i >= 0 Then
A = strings(i)
Debug.Print A
End If
Next i
**************** This works perfectly
In my ASP page Im trying this:
*********************
Dim strings
Dim i
Set objChoices = Server.CreateObject("cChoicesArray.cChoices")
strings = objChoices.numberlist()
For i = LBound(strings) To UBound(strings)
If i >= 0 Then
response.write(strings(i))
End If
Next
Set objChoices = Nothing
************************
Fisrt I tried to remove the i after next as I got this err:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/reporting/choices.asp, line 20, column 5
Next i
----^
Once I removed that Im getting this error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/reporting/choices.asp, line 18
Where Line 18 = response.write(strings(i)). I have also tried varA = strings(i) but it gives me the same error...
Any ideas appreciated.
Regards
Marnus
|