Association problem records of the nvarchar (max) field and Internet access

Source: Internet
Author: User

 

Problem description:

 

1. the client is initiated by JS and transmitted to the server with a long text (including Chinese characters) through Ajax, and then calls the Stored Procedure (parameter type varchar (max )), write to target table (corresponding field type varchar (max ))

 

3. access through the Internet address of the application. Some data may cause errors (the input table format data stream (TDS) Remote Process Call (RPC) protocol stream is incorrect. Parameter 4 ("@ content"): The Data Length of the Data Type 0xa7 or the metadata length is invalid)

 

3. Access the same data through the Intranet address of the application, and everything works normally.

 

Solution:

Change the parameter type of the stored procedure and the Field Type of the target table to nvarchar (max). The problem is solved.

 

Analysis:

1. The possible problem is that the ajaxpro client-server interaction section, and the same operations on the Intranet and Internet have different results. I wonder if it is associated with the IE Settings section.

2. For sql2008 databases, the nvarchar field is still the best choice for Chinese Characters

 

Conclusion:

The problem is quite strange. The specific cause is unknown. Please tell us the specific cause if you have encountered it. Thank you!

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.