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!