XML 输出在 SQL 中被截断 [英] XML Output is Truncated in SQL
问题描述
我需要以 XML 格式返回我的结果集,这可以正常工作,但是如果记录数增加,我的 xml 输出将被截断
这里是我的查询
I need to return my result set in XML and this works fine, but if the number of records are increased, my xml output is truncated
here is my query
select t.id,t.name,t.address from test FOR XML AUTO, ROOT('Response'), ELEMENTS
但是我已经设置了一些选项来增加输出结果集,例如..
However I have set some option to increase the output result set like..
Tools --> Options --> Query Results --> SQL Server --> Results to Text --> Maximum
number of characters displayed in each column
Tools --> Options --> Results --> Maximum characters per column
但我仍然无法得到我想要的结果.
but still I am unable to get my desired result.
请提出我的解决方案
但是,当我单击 XML 时,它会在另一个查询窗口中打开并在此处显示所有 xml,但它不会返回所有 xml 而不是截断的 xml.
However when I click on the XML, it open in another query window and all xml shown here, but it not return all xml instead of truncated xml.
谢谢....
推荐答案
我在 management studio 和 xml 结果集方面遇到了同样的问题.我已经通过使用 c# 和 SqlDataReader 以编程方式获取输出解决了这个问题.
I've had the same problem with management studio and xml result sets. I've solved this by getting the output programatically with c#, with SqlDataReader.
这篇关于XML 输出在 SQL 中被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!