How to change variable 'System.Collections.Generic.IEnumberable(Of Object)' to 'System.Data.DataTable'

How to change variable of ‘System.Collections.Generic.IEnumberable(Of Object)’ to ‘System.Data.DataTable’

  • Initialise the Datatable
  • For each item in Object collection
  • Add datarow, arrRow={item.tostring}

(Ctype(Object), System.Data.DataTable)

Tell me if this works


I think you are getting this error while writing a query or Type casting.

If I am Correct Please post the query, so that we can analyse the issue.