-
Notifications
You must be signed in to change notification settings - Fork 321
Improved Sql bulk copy error message #437
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
Improved Sql bulk copy error message #437
Conversation
support RowID for DataTable and DataRow[]
f0af312 to
d8253f5
Compare
d8253f5 to
d82f338
Compare
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
Outdated
Show resolved
Hide resolved
0a2a219 to
df2ab9f
Compare
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/TvpTest.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/tests/ManualTests/SQL/SqlBulkCopyTest/DataConversionErrorMessageTest.cs
Outdated
Show resolved
Hide resolved
…into bulkCopyError
df2ab9f to
4d1cfbf
Compare
cheenamalhotra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good!
Would really like to see same for SqlDataReader and IDataReader if possible as they're widely used.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/BulkCopyAEErrorMessage.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/BulkCopyAEErrorMessage.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/BulkCopyAEErrorMessage.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/BulkCopyAEErrorMessage.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/tests/ManualTests/SQL/SqlBulkCopyTest/DataConversionErrorMessageTest.cs
Outdated
Show resolved
Hide resolved
…/BulkCopyAEErrorMessage.cs Co-Authored-By: Cheena Malhotra <v-chmalh@microsoft.com>
71d6900 to
f9de9e2
Compare
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
f9de9e2 to
fb25527
Compare
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/DateTimeVariantTest.cs
Outdated
Show resolved
Hide resolved
f04f5f0 to
fa22b29
Compare
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
Outdated
Show resolved
Hide resolved
|
Add an .editorconfig file? |
|
Thanks @ErikEJ |
plus support short date issue at Linux
fa22b29 to
928d023
Compare
|
It is enforced for us - maybe via a StyleCop rule then? |
Improved the error message for wrong data type conversion with adding more detail about the source of error in the sqlBulkCopy.
In this change, the error message of converting a string to a numerical column is handled and the complementary information about the column name and the row number of the data source is added.
We brought this additional information for DataTable and DataRow[]. For the rest of the datatype supported by SqlBulkCopy, it will add in the next improvements.