Fix the System. Data. SqlClient. SqlException exception caused by the too long string updated by the SubSonic3.0 plug-in

Source: Internet
Author: User

Recently, the company's customer service submitted a BUG saying that some of the products could not be updated while updating the product details. Some of them have been unavailable for a while, so they are temporarily put down. This problem has just occurred again, so I processed it immediately.

Open the project solution, enter the DEBUG mode, and track the submitted operation data. The System is generated during the submission. data. sqlClient. sqlException (0x80131904): The input table format data stream (TDS) Remote Procedure Call (RPC) protocol stream is incorrect. Parameter 4 ("@ up_xxx"): The data length of data type 0xA7 or the metadata length is invalid.

Baidu finds that the exception is caused by a long string update. You must set the parameter Size to-1.

  

 

  (qry.Parameters != (QueryParameter param ====                     (param.DataType.ToString() == = -                    (p.Direction == ParameterDirection.Output || p.Direction ===                    (param.ParameterValue == = (param.DataType == paramValue = (!(!paramValue.Equals(= ==

 

Run the task again and submit the task normally.

 

  

After the above Code is added, you can use the SubSonic3.0 plug-in source code again.

 

Copyright:

This article was originally published by AllEmpty and published in the blog Park. You are welcome to repost it. You must retain this statement without your consent (otherwise, you will be entitled to pursue accountability) and provide the original article link clearly on the article page, if there is a problem, you can through 1654937@qq.comThank you very much for contacting me.

The content of this article, as long as the main and everyone to learn and make progress together, interested friends can add Q group: 327360708 or e-mail to me (1654937@qq.com), everyone to discuss.

For more information, visit the blog:

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.