Skip to content

Would be very convinent if in SqlBulkCopy, non matching column mapping exception specifies the mismatched column #3170

@JNjenga

Description

@JNjenga

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 message The 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 under SqlBulkCopyTest

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.

Metadata

Metadata

Assignees

Labels

Up-for-Grabs 🙌Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions