“Unable to cast object of type 'System.Data.DataTable' to type 'System.Data.IDataReader'” to Strongly Typed DataSet
December 16, 2010 at 11:18 AM
—
Fred Mastro
Unable to cast object of type 'System.Data.DataTable' to type 'System.Data.IDataReader'
When you try and set a Strongly Typed DataTable to another DataTable.
Use .Merge on your strongly typed dataset to correct this problem.
Dim dsCallData As YourStronglyTypedDataSet
Dim dsCallInfoQueriedFromDB As New DataTable
'... code here to populate dsCallInfoQueriedFromDB from database ...
dsCallData.dtCallInfol.Merge(dsCallInfoQueriedFromDB)
11bae14f-1250-46c3-b093-58e69f5cccc9|0|.0
Posted in: VB.NET
Tags: