Repository navigation
[7.1] ArgumentException after updating Microsoft.Data.SqlClient to 7.1.0 #4738
Description
Activity
- addedRegression 💥Issues that are regressions introduced from earlier PRs.Issues that are regressions introduced from earlier PRs.
on Sep 23, 2026 - linked a pull request that will close this issue[7.1.1 Cherry-pick] Fix precision of rescaled zero decimal parameters #4732
on Sep 23, 2026 🔍 Triage Summary
Check Result Issue type Bug Environment All required environment details provided for investigation Area No exact match in the standard area list; closest is core TdsParserdecimal/rescale handling (notSqlBulkCopy,Json,Vector, or any SNI area)Duplicates Duplicate of/child tracking issue for #4715 (parent, still open) Regression Confirmed regression in 7.1.0 from prior working versions (writing default 0Mto adecimal(3,3)column now throwsArgumentExceptioninTDSExecuteRPCAddParameter), related to the decimal-scale-adjustment change discussed in #4443Analysis
The reporter is writing a default
0Mvalue to adecimal(3,3)column via EF Core;TdsParser.AdjustDecimalScalebumps the precision from 3→4 when rescaling zero, which then fails the RPC parameter's out-of-range check inTDSExecuteRPCAddParameter. This is a P1 regression affecting anyone using default/zero decimal values with tight precision/scale columns. A minimal, reproducible repo is linked, and a stack trace is provided. Notably, PR #4732 ("[7.1.1 Cherry-pick] Fix precision of rescaled zero decimal parameters") is already merged and listed as closing this issue, targeting the 7.1.1 milestone.Next Steps
- Since PR [7.1.1 Cherry-pick] Fix precision of rescaled zero decimal parameters #4732 has already merged the fix for this exact scenario (rescaled zero decimal parameter precision) and targets the 7.1.1 milestone, verify the fix resolves this repro and that the issue is auto-closed on release, rather than assigning to Copilot coding agent for fresh investigation.
- Confirm the fix in [7.1.1 Cherry-pick] Fix precision of rescaled zero decimal parameters #4732 covers this reporter's exact repro (
decimal(3,3)with default0Mvia EF Core) — if a maintainer wants extra assurance, add a regression test using the linked repro (https://github.com/andygjp/TdsParserArgumentException). - Since this is a child/duplicate of parent issue ArgumentException after updating Microsoft.Data.SqlClient to 7.1.0 #4715, ensure both are tracked together and closed in coordination when 7.1.1 ships.
Note: This triage summary is auto-generated by an AI agent. The analysis and suggestions above have not been verified by a human maintainer. Please treat as preliminary guidance only.
Generated by SqlClient Issue Auto-Triage for #4738 · copilot · auto · 26.4 AIC · ⌖ 12.4 AIC · ⊞ 13K · ◷
- added a commit that references this issue
on Sep 23, 2026
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Describe the bug
My unit tests fail after updating to the latest version. This is the stack trace:
I'm writing 0 to a column that is decimal(3,3).
TdsParser.AdjustDecimalScalechanges the precision from 3 to 4 and then I get the exception. If I change the value of the property of the entity from C# default of 0M to 0.001M it works. I assume this is related to #4443.To reproduce
I have created a repo that demonstrates the issue: https://github.com/andygjp/TdsParserArgumentException.
Expected behavior
Should be able to use default values for decimal types.
Further technical details
Microsoft.EntityFrameworkCore.SqlServer: 11.0.0-rc.1.26425.128
Microsoft.Data.SqlClient: 7.1.0
.NET: 11.0.100-rc.1.26425.128
SQL Server 2025 (https://mcr.microsoft.com/en-us/artifact/mar/mssql/server/tag/2025-latest)
MacOS 27