You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.ArgumentException: Cannot remove this column, because it is a part of the constraint Constraint1 on the table . at System.Data.DataColumnCollection.CanRemove
#3023
Closed
pyliakm opened this issue
Jul 11, 2019
· 4 comments
System.ArgumentException: Cannot remove this column, because it is a part of the constraint Constraint1 on the table . at System.Data.DataColumnCollection.CanRemove
General
.Net core 2.2 Windows 10 Version 1803
Stack trace:
at System.Data.DataColumnCollection.CanRemove(DataColumn column, Boolean fThrowException)
at System.Data.DataColumnCollection.BaseRemove(DataColumn column)
at System.Data.DataColumnCollection.Remove(DataColumn column)
at System.Data.ProviderBase.SchemaMapping.RollbackAddedItems(List`1 items)
at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMappingInternal(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMapping(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
Snippet of code: DataTable cards = new DataTable(); cards.Load(reader);
where reader is SqlDataReader
The problem is related with geography sql data type, if I remove the column with this data type, it works fine.
The text was updated successfully, but these errors were encountered:
Although I don't have enough data to identify this as the direct root cause of the exception, SQL Server spatial types are known not to support .NET Core. So it is possible that this is a duplicate of dotnet/SqlClient#30.
Issue Title
System.ArgumentException: Cannot remove this column, because it is a part of the constraint Constraint1 on the table . at System.Data.DataColumnCollection.CanRemove
General
.Net core 2.2
Windows 10 Version 1803
Stack trace:
at System.Data.DataColumnCollection.CanRemove(DataColumn column, Boolean fThrowException)
at System.Data.DataColumnCollection.BaseRemove(DataColumn column)
at System.Data.DataColumnCollection.Remove(DataColumn column)
at System.Data.ProviderBase.SchemaMapping.RollbackAddedItems(List`1 items)
at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMappingInternal(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMapping(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
Snippet of code:
DataTable cards = new DataTable(); cards.Load(reader);
where reader is SqlDataReader
The problem is related with geography sql data type, if I remove the column with this data type, it works fine.
The text was updated successfully, but these errors were encountered: