I have tried every help available on all other relative topics, but nothing sorted out the issue , Code is as below
VB6 (DLL Code):
Public Function enterorder(vals() As Variant, ordhdr() As Variant) As String
................... code ............
enterorder = "done"
End Function
ASP :
SET objdll = server.createobject("dllproname.classname")
Dim values(1, 4)
Dim ordhdr(1)
dim ret
ordhdr(0) = "1012"
ordhdr(1) = "ASP TESTING descript"
values(0, 0) = "testing "
values(0, 1) = "testing 2"
values(0, 2) = "HO"
values(0, 3) = "2.0000"
values(0, 4) = "12.0000"
values(1, 0) = "testing part 2 "
values(1, 1) = "testing again"
values(1, 2) = "HO"
values(1, 3) = "2.0000"
values(1, 4) = "12.0000"
ret = objdll.EnterOrder(values(), ordhdr())
response.write("Done")
The code is giving error :
Microsoft VBScript runtime error '800a0009' Subscript out of range
I have tried removing the multidimensional arrays and only sending normal array, same error remains.
I have also tried removing paranthesis () while passing the array like ( objdll.EnterOrder(values , ordhdr)
) it gives Type Mismatch error.
My VB6 code was accepting string arrays, but i changed it to variant type following some guidelines on help topics, that also didn't helped.
The same code works , if i add this dll into vb6 project reference and then call the same function, it works perfect. But same code with asp don't work.
Thanks.