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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -