G
Guest
Hello, I am trying to merge into a dataset and It fails with the following
exception. I would like to know what table is causing this problem. It
looks like one of the data columns names is the source of the problem. I
thought I could catch the merge failed exception but it is not raised. I
also check the ds.HasErrors property after the exception is raised and there
are no errors set in the dataset. What do I have to do to identify
specifically what column in what table in my dataset is causing the problem?
I am simply doing this
ds.Merge( anotherDataSet );
Here is the error.
System.InvalidCastException: Specified cast is not valid.
at System.Data.DataColumnCollection.get_Item(String name)
at System.Data.Merger.MergeSchema(DataTable table)
at System.Data.Merger.MergeTableData(DataTable src)
at System.Data.Merger.MergeDataSet(DataSet source)
at System.Data.DataSet.Merge(DataSet dataSet, Boolean preserveChanges,
MissingSchemaAction missingSchemaAction)
at System.Data.DataSet.Merge(DataSet dataSet)
at Diversa.DeNovoDataAccessLayer.DeNovoDAC.LoadPeptideItem(String
FileName) in
d:\cvs_root\denovoviewer2\denovodataaccesslayer\denovodac.cs:line 126
exception. I would like to know what table is causing this problem. It
looks like one of the data columns names is the source of the problem. I
thought I could catch the merge failed exception but it is not raised. I
also check the ds.HasErrors property after the exception is raised and there
are no errors set in the dataset. What do I have to do to identify
specifically what column in what table in my dataset is causing the problem?
I am simply doing this
ds.Merge( anotherDataSet );
Here is the error.
System.InvalidCastException: Specified cast is not valid.
at System.Data.DataColumnCollection.get_Item(String name)
at System.Data.Merger.MergeSchema(DataTable table)
at System.Data.Merger.MergeTableData(DataTable src)
at System.Data.Merger.MergeDataSet(DataSet source)
at System.Data.DataSet.Merge(DataSet dataSet, Boolean preserveChanges,
MissingSchemaAction missingSchemaAction)
at System.Data.DataSet.Merge(DataSet dataSet)
at Diversa.DeNovoDataAccessLayer.DeNovoDAC.LoadPeptideItem(String
FileName) in
d:\cvs_root\denovoviewer2\denovodataaccesslayer\denovodac.cs:line 126