Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

@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.

@DavoudEshtehari DavoudEshtehari added this to the 5.0.0-preview3 milestone May 19, 2022
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants