Question : FOR XML RAW (String)

I have created a select statement that gets a large result. When i display it with the "FOR XML RAW", the result is truncated. It seems that the result i displayed in one continuous string, in stead of being displayed as individual lines, like a normal XML file.
How can i get the full result, if at all?

The select statement i made in an ASP page.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/Connections/dbconnect.asp" -->
<%
Dim shop_gear__MMColParamTID
shop_gear__MMColParamTID = "SAS"
If (Request("MM_EmptyValue") <> "") Then 
  shop_gear__MMColParamTID = Request("MM_EmptyValue")
End If
%>
<%
Dim shop_gear
Dim shop_gear_cmd
Dim shop_gear_numRows

Set shop_gear_cmd = Server.CreateObject ("ADODB.Command")
shop_gear_cmd.ActiveConnection = MM_dbconnect_STRING
shop_gear_cmd.CommandText = "SELECT * FROM dbo.shop_gear WHERE shop_gear.TID = ? AND shop_gear.SHOW_SHOP_1_DK = '1' ORDER BY shop_gear.BRID ASC FOR XML RAW, ROOT" 
shop_gear_cmd.Prepared = true
shop_gear_cmd.Parameters.Append shop_gear_cmd.CreateParameter("param1", 200, 1, 255, shop_gear__MMColParamTID) ' adVarChar

Set shop_gear = shop_gear_cmd.Execute
shop_gear_numRows = 0
%>
<%= "<?xml version=""1.0"" encoding=""UTF-8""?>" %>
<%=(shop_gear.Fields.Item("XML_F52E2B61-18A1-11d1-B105-00805F49916B").Value)%>

<%
shop_gear.Close()
Set shop_gear = Nothing
%>

Answer : FOR XML RAW (String)

> I found out that the problem was a limitation in the SQL servers ability to deliver the result. It was not the code as was sugested

That is not true. SQL Server will deliver the result fine. Truncation happens because the code is faulty. "For XML" queries are not so easy to use in ASP. Certainly not when the code supposes that SQL Server returns a String (it returns XML, but you need the right codeto catch that into the code).
Random Solutions  
 
programming4us programming4us