Would be very convinent if in SqlBulkCopy, non matching column mapping exception specifies the mismatched column #3170
Labels
💡 Enhancement
Issues that are feature requests for the drivers we maintain.
🙌 Up-for-Grabs
Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label
Is your feature request related to a problem?
When doing a bulk copy, if a column mapping that has an invalid destination column name is specified, an exception is thrown. Specifically
InvalidOperationException
with the messageThe given ColumnMapping does not match up with any column in the source or destination.
For tables that have a lot of columns it is really hard to zero in on the mismatching column.You can repro this behavior by referencing the test case
MissingTargetColumnTest
underSqlBulkCopyTest
Describe the solution you'd like
It would be nice if the exception message gave a hint on which column had an issue. The exception message could include the name of first mismatched column name.
The text was updated successfully, but these errors were encountered: