Hi everybody,
I am trying to generate a "cmd.Parameters" for a "reqManager.ExecuteQuery" dynamically, but I don't know how to generate an array as object!!
If I try:
I get a "List cannot be converted to object" error, but if I dim theParamsList as "object", then I cannot add items to it:
But then I get an "index out of bound for lenght 0" because the object does not have elements and I cannot add to it.
So, how can I generate an array as object dynamically?
Best regards
I am trying to generate a "cmd.Parameters" for a "reqManager.ExecuteQuery" dynamically, but I don't know how to generate an array as object!!
If I try:
B4X:
Private theParamsList As List
theParamsList.Initialize
For Each myVal As String In m2.Values 'Here we get the values
theParamsList.Add(myVal)
Next
cmd.Parameters = theParamsList
reqManager.ExecuteCommand(cmd , theQuery)
I get a "List cannot be converted to object" error, but if I dim theParamsList as "object", then I cannot add items to it:
B4X:
Private theParamsList() As Object
Dim cont As Int = 0
For Each myVal As String In m2.Values 'Here we get the values
theParamsList(cont)=myVal
cont=cont+1
Next
But then I get an "index out of bound for lenght 0" because the object does not have elements and I cannot add to it.
So, how can I generate an array as object dynamically?
Best regards