您的位置:首页 > 其它

for xml path('') 引发的数据不完整

2013-09-26 20:51 225 查看
When you read Extensible Markup Language (XML) data from Microsoft SQL
Server by using the SqlDataReader/SqlDataAdatper object or [b]excuteScalar() method , the XML in the first column of
[/b]
the first row is truncated at 2,033 characters. You expect all of the

contents of the XML data to be contained in a single row and column.

官方解释:

如果您使用 ExecuteReaderBeginExecuteReader 访问 XML 数据,SQL Server 将以多行(每行 2,033 个字符)方式返回长度大于 2,033 个字符的所有 XML 结果。 若要避免发生此行为,请使用 ExecuteXmlReaderBeginExecuteXmlReader 读取 FOR XML 查询。 有关更多信息,请参见位于 http://support.microsoft.com 上的 Microsoft 知识库中的文章 Q310378“PRB: XML Data Is Truncated When You Use SqlDataReader”(PRB:使用 SqlDataReader 时 XML 数据被截断)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐