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

Fix CommandText length for stored procedures #1484

Merged
merged 5 commits into from
May 30, 2022

Conversation

JRahnama
Copy link
Contributor

CommandText length cannot be more than 1046 bytes when Command type is stored procedure. This addresses The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. The RPC name is invalid. exception.

@Wraith2
Copy link
Contributor

Wraith2 commented Jan 21, 2022

Interesting. Makes you wonder why anyone would hit that limit.

@DavoudEshtehari DavoudEshtehari added the 🐛 Bug! Issues that are bugs in the drivers we maintain. label Jan 21, 2022
@JRahnama
Copy link
Contributor Author

Interesting. Makes you wonder why anyone would hit that limit.

basically when it is 1046 bytes, consider each char is taking 2 bytes then the actual length of the text cannot be more than 523. Some people may get to that point. This is just to make sure that never happens.

Co-authored-by: David Engel <dengel1012@gmail.com>
@DavoudEshtehari DavoudEshtehari added this to the 5.0.0-preview3 milestone May 19, 2022
David-Engel and others added 2 commits May 26, 2022 16:03
Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com>
@David-Engel David-Engel requested review from DavoudEshtehari and removed request for johnnypham May 27, 2022 21:55
Copy link
Contributor

@DavoudEshtehari DavoudEshtehari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, don't forget to modify the test scenario as we discussed.

@JRahnama JRahnama merged commit 2cfac4d into dotnet:main May 30, 2022
DavoudEshtehari pushed a commit to DavoudEshtehari/SqlClient that referenced this pull request Aug 11, 2022
Kaur-Parminder pushed a commit that referenced this pull request Aug 11, 2022
Fix for CommandText length for Stored Procedures.
DavoudEshtehari pushed a commit to DavoudEshtehari/SqlClient that referenced this pull request Aug 15, 2022
DavoudEshtehari added a commit to DavoudEshtehari/SqlClient that referenced this pull request Aug 16, 2022
# Conflicts:
#	src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants