Private Sub PopulateDataSet(ByRef report As Project.Report)ĭim DT1 As DataTable = New DataTable("Test Table1")ĭT1.Columns.Add(New DataColumn("Column1", GetType(Int32)))ĭT1.Columns.Add(New DataColumn("Column2", GetType(Int32)))ĭT1.Columns.Add(New DataColumn("Column3", GetType(Int32))) Any help is appreciated! Public Class Report Shouldn't it be getting serialized as a DataSet.not a DataTable? I'm not sure exactly what is causing me this error. In a Unit Test I instantiate a Report object, give its properties values, then serialize it, then deserialize it.Īfter adding a method to populate the DataSet, the Deserialization function gives me Error: Unable to cast object of type '' to type ''. This DataSet is supposed to contain at least one DataTable. A Report object has several different properties, including a DataSet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |