Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#12482 Fix batch inserts using with different types on a sql_variant column #24111

Merged
merged 2 commits into from
Feb 11, 2021
Merged

Conversation

yesmey
Copy link
Contributor

@yesmey yesmey commented Feb 10, 2021

Regarding issue #12482
Currently when batch inserting values into a sql_variant column each DbParameter will resolve its own SqlDbType. This results in invalid sql and will therefore throw an exception

This pull request passes DbType.Object for any parameter targeting a variant column so that each DbParameter will map into the SqlDbType sql_variant instead, making the batch insert possible.

This is my first time working with this repository so please let me know if something is missing or if more tests are required

@AndriySvyryd AndriySvyryd merged commit 5a5ac6b into dotnet:main Feb 11, 2021
@AndriySvyryd
Copy link
Member

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants