C
Corey Wirun
Hi All,
I've got a puzzling situation. I have a strongly-typed DataSet with 3
tables which I want to copy into a generic DataSet. So I do this:
DataSet ds = null;
StrongDataSet dsStrong = new StrongDataSet();
Dosomething( ref dsStrong );
ds = dsStrong.Copy();
An exception is thrown on the copy (following). I dump the strong dataset
to an XML file previously and it looks fine.
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.InitRecords()
at System.Data.Index..ctor(DataTable table, Int32[] indexDesc,
DataViewRowState recordStates, IFilter rowFilter)
at System.Data.DataTable.GetIndex(Int32[] indexDesc, DataViewRowState
recordStates, IFilter rowFilter)
at System.Data.DataColumn.get_SortIndex()
at System.Data.DataColumn.IsNotAllowDBNullViolated()
at System.Data.DataSet.EnableConstraints()
at System.Data.DataSet.set_EnforceConstraints(Boolean value)
at System.Data.DataSet.Copy()
at Ahlapi.CAhlapi.GetPlantReport(PlantReportTypeEnum type, ArrayList
reportParams, DataSet& ds) in e:\devel\ahlapi\cahlapi.cs:line 664
2004-06-29 09:59:14,187 [2876] FATAL Ahlapi.CAhlapi [] - Index was outside
the bounds of the array.
2004-06-29 09:59:15,265 [2876] FATAL Ahlapi.CAhlapi [] - System.Data
Any ideas anyone!
Thanks!
Corey.
I've got a puzzling situation. I have a strongly-typed DataSet with 3
tables which I want to copy into a generic DataSet. So I do this:
DataSet ds = null;
StrongDataSet dsStrong = new StrongDataSet();
Dosomething( ref dsStrong );
ds = dsStrong.Copy();
An exception is thrown on the copy (following). I dump the strong dataset
to an XML file previously and it looks fine.
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.Sort(Int32 left, Int32 right)
at System.Data.Index.InitRecords()
at System.Data.Index..ctor(DataTable table, Int32[] indexDesc,
DataViewRowState recordStates, IFilter rowFilter)
at System.Data.DataTable.GetIndex(Int32[] indexDesc, DataViewRowState
recordStates, IFilter rowFilter)
at System.Data.DataColumn.get_SortIndex()
at System.Data.DataColumn.IsNotAllowDBNullViolated()
at System.Data.DataSet.EnableConstraints()
at System.Data.DataSet.set_EnforceConstraints(Boolean value)
at System.Data.DataSet.Copy()
at Ahlapi.CAhlapi.GetPlantReport(PlantReportTypeEnum type, ArrayList
reportParams, DataSet& ds) in e:\devel\ahlapi\cahlapi.cs:line 664
2004-06-29 09:59:14,187 [2876] FATAL Ahlapi.CAhlapi [] - Index was outside
the bounds of the array.
2004-06-29 09:59:15,265 [2876] FATAL Ahlapi.CAhlapi [] - System.Data
Any ideas anyone!
Thanks!
Corey.