I have the following:
Dim array() as Object
I fill it with a:
webservice.execute(Parm1).ToArray
I want to pass that array to DataTable
in a dynamic and efficient way.
I have the following:
Dim array() as Object
I fill it with a:
webservice.execute(Parm1).ToArray
I want to pass that array to DataTable
in a dynamic and efficient way.
You have two options:
Create the DataTable, and traverse the Array by adding rows to the DT.
Use the following function:
Public Shared Function GetDataTableFromArray(ByVal array As Object()) As DataTable
Dim dataTable As New DataTable()
dataTable.LoadDataRow(array, True)
Return dataTable
End Function