c# - What to do if string sent to SqlCommand.ExecuteNonQuery is too long? -
The string inserted in a table is about 2,070 characters long and I think I get this error when I Send it to ExecuteNonQuery: The Incoming Table Data Stream (TDS) Remote Procedure Call (RPC) protocol stream is incorrect. The RPC name is invalid.
If I copy / paste the string from the debugger into SQL Server Management Studio, it will be properly inserted. This is the reason why I think this string is the length.
My question: Is there any way to run this insert statement? 77 values, so a stored procedure will need to accept all those standards and the parameters can not always be in the same order.
I can always send inserted as a string parameter in a normal process, which executes only dynamic SQL, but I try to avoid completely dynamic SQL.
Any help is appreciated. Thank you.
this was my error
ExecuteNonQuery executable method also includes command type parameter That is what I was not specifying. By default, this text will play as a command-line. Storage Processor
Comments
Post a Comment