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.