[release/10.0] Fix parameter limit (because of sp_executesql).#37334
Merged
cincuranet merged 2 commits intodotnet:release/10.0from Dec 10, 2025
Merged
[release/10.0] Fix parameter limit (because of sp_executesql).#37334cincuranet merged 2 commits intodotnet:release/10.0from
cincuranet merged 2 commits intodotnet:release/10.0from
Conversation
SamMonoRT
approved these changes
Dec 10, 2025
roji
approved these changes
Dec 10, 2025
Contributor
Author
|
cc @artl93 |
artl93
reviewed
Dec 10, 2025
Member
artl93
left a comment
There was a problem hiding this comment.
@cincuranet - I remember we took something similar recently. Is this related to a similar issue? I also note that this is customer reported - is this related to another issue? The one that's linked is opened by you. Thanks!
Contributor
Author
Member
|
Ahh... I see it now, related to the other PR up for approval - this all relates back to #37185. |
Contributor
Author
|
Yes. |
Contributor
Author
|
Approved via email. |
This was referenced Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37336.
Description
This change fixes an incorrect maximum limit for SQL Server parameters. Although usually the error states 2100, SqlClient uses
sp_executesqlwhich takes 2 parameters and hence the count needs to be adjusted.Customer impact
Query fails to execute when collection with 2099 or 2100 parameters (exactly) is present in the query.
How found
Customer reported on 10.0.
Regression
Yes.
Testing
Tests added.
Risk
Low. Quirk added.