nvarchar (MAX) field and extranet access associated problem record

Source: Internet
Author: User

Problem Description:

1. Client JS initiated, via AJAX to the service end of a long text (including Chinese characters), and then call the stored procedure (parameter type varchar (max)), write to the target table (corresponding field type varchar (max))

3. Through this application extranet address, individual data causes an error (the incoming tabular data stream (TDS) Remote Procedure Call (RPC) protocol stream is incorrect. Parameter 4 ("@content"): Data type 0xa7 data length or metadata length is invalid)

3. Access to the same data through the application intranet address, then all normal

Workaround:

Change the stored procedure parameter type and the corresponding target table field type to nvarchar (max) type, problem resolution

Analysis:

1. The suspected problem lies in the Ajaxpro client-server interaction, and the internal and external network of the same operation has different results, do not know whether and the IE Setup section related

2. For SQL2008 databases, the nvarchar field is still the best choice for Chinese character content

Conclusion:

The question compares demon different, the concrete reason is unknown, everybody has met please inform the specific reason, thanks.

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.