Skip to content

Add SqlBulkCopyOptions.AnsiWarnings Property #3669

@rferraton

Description

@rferraton

Is your feature request related to a problem? Please describe.

When SqlBulkCopy is used to write string data too long for the target column the WriteToServer failed saying data are truncated.
It is not possible (as far as i know) to set another behavior (pass without failing and truncate the string like with an SET ANSI_WARNINGS OFF;)

Describe the solution you'd like

It would be great to have a SqlBulkCopyOptions (like SqlBulkCopyOptions.AnsiWarnings) that can be disabled (or off) in order to mimic the SET ANSI_WARNINGS OFF behavior

Describe alternatives you've considered

alternative need to get info about the target table and it's columns to cut the data at source using the length of the target. It is painfull.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement 💡Issues that are feature requests for the drivers we maintain.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions