Unanswered: Using sp_OAmethod for dll that has array
I have a ActiveX control creted with VB6 that I can access successfully from vb form. There are parameters on the method:
input - varchar(5)
output - array of char(1)
The .dll declaration for the Method is:
Public Function Cat1(ina As String, Outa() As String)
When I call the dll with sp_OAMethod and @ina is the input parameter:
EXEC @hr = sp_OAMethod @object, 'Cat1', Null, @ina
get an error:
Parameter not optional.
It seems to me that since it is an array it would be returned as a result set. based on the documentation:
If the method return value is an array with one or two dimensions, the array is returned to the client as a result set:
* A one-dimensional array is returned to the client as a single-row result set with as many columns as there are elements in the array. In other words, the array is returned as (columns).
* A two-dimensional array is returned to the client as a result set with as many columns as there are elements in the first dimension of the array and with as many rows as there are elements in the second dimension of the array. In other words, the array is returned as (columns, rows).