[6.1] Fixing NullReferenceException issue with SqlDataAdapter#3846
[6.1] Fixing NullReferenceException issue with SqlDataAdapter#3846priyankatiwari08 wants to merge 20 commits intorelease/6.1from
Conversation
fbdcc90 to
8291391
Compare
Removed unused SqlDataAdapterBatchUpdateTests.cs file from project.
aed9e25
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
…com/dotnet/SqlClient into dev/prtiwar/6.1-SqlDataAdapterIssue
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
apoorvdeshmukh
left a comment
There was a problem hiding this comment.
You may want to resolve the copilot comments
...crosoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Outdated
Show resolved
Hide resolved
...crosoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Show resolved
Hide resolved
...crosoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Show resolved
Hide resolved
Removed EnsureBuyerSellerObjectsExist calls from tests.
...Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/SqlDataAdapterBatchUpdateTests.cs
Outdated
Show resolved
Hide resolved
apoorvdeshmukh
left a comment
There was a problem hiding this comment.
To be ported after #3749 is fixed in main
| <ItemGroup> | ||
| <Folder Include="microsoft.data.sqlclient\tests\manualtests\alwaysencrypted\testfixtures\setup\" /> | ||
| </ItemGroup> |
There was a problem hiding this comment.
This empty Folder ItemGroup is unnecessary and should be removed. Modern SDK-style .csproj files automatically include folders with source files. This element adds no value and creates clutter in the project file. Additionally, the path uses incorrect casing (lowercase instead of proper casing) which doesn't match the actual folder structure.
| <ItemGroup> | |
| <Folder Include="microsoft.data.sqlclient\tests\manualtests\alwaysencrypted\testfixtures\setup\" /> | |
| </ItemGroup> |
| var dt = new DataTable(_tableName); | ||
| dt.Columns.AddRange(new[] | ||
| { | ||
| new DataColumn("BuyerSellerID", typeof(int)), |
There was a problem hiding this comment.
Disposable 'DataColumn' is created but not disposed.
| dt.Columns.AddRange(new[] | ||
| { | ||
| new DataColumn("BuyerSellerID", typeof(int)), | ||
| new DataColumn("SSN1", typeof(string)), |
There was a problem hiding this comment.
Disposable 'DataColumn' is created but not disposed.
| { | ||
| new DataColumn("BuyerSellerID", typeof(int)), | ||
| new DataColumn("SSN1", typeof(string)), | ||
| new DataColumn("SSN2", typeof(string)), |
There was a problem hiding this comment.
Disposable 'DataColumn' is created but not disposed.
| command.ExecuteNonQuery(); | ||
| } | ||
|
|
||
| // ✅ CHANGED: Use unique SP names |
There was a problem hiding this comment.
This comment contains checkmark emojis and review-style markers that should be removed. Comments in production code should simply explain the code without review artifacts. Consider removing this comment since the code is self-explanatory.
| command.ExecuteNonQuery(); | ||
| } | ||
|
|
||
| // ✅ CHANGED: Use unique SP names |
There was a problem hiding this comment.
This comment contains checkmark emojis and review-style markers that should be removed. Comments in production code should simply explain the code without review artifacts. Consider removing this comment since the code is self-explanatory.
| private readonly ColumnEncryptionKey _columnEncryptionKey1; | ||
| private readonly ColumnEncryptionKey _columnEncryptionKey2; | ||
|
|
||
| // ✅ ADD: Unique stored procedure names based on table name |
There was a problem hiding this comment.
This comment contains checkmark emojis and review-style markers that should be removed. Comments in production code should simply explain the code without review artifacts. Consider changing to a simple explanatory comment or removing it entirely since the property name and implementation are self-explanatory.
| dt.Columns.AddRange(new[] | ||
| { | ||
| new DataColumn("BuyerSellerID", typeof(int)), | ||
| new DataColumn("SSN1", typeof(string)), | ||
| new DataColumn("SSN2", typeof(string)), | ||
| }); |
There was a problem hiding this comment.
Disposable 'DataColumn' is created but not disposed.
| dt.Columns.AddRange(new[] | |
| { | |
| new DataColumn("BuyerSellerID", typeof(int)), | |
| new DataColumn("SSN1", typeof(string)), | |
| new DataColumn("SSN2", typeof(string)), | |
| }); | |
| dt.Columns.Add("BuyerSellerID", typeof(int)); | |
| dt.Columns.Add("SSN1", typeof(string)); | |
| dt.Columns.Add("SSN2", typeof(string)); |
|
closing as it is addressed by #3877 |
Ports #3749 to release/6.1 branch
Addresses #3845