Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

XML Workshop XV - Accessing FOR XML results with ADO.NET Expand / Collapse
Author
Message
Posted Wednesday, March 19, 2008 1:45 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:42 AM
Points: 460, Visits: 2,523
I dont think FOR XML will give you better performance. FOR XML may not be used as a means to increase performance. It is usually used when an XML output need to be passed to the calling application.

If you have a slow running query, you should look at the execution plan to see what makes the query slow. The execution plan might tell what is causing the problem.


.
Post #471411
Posted Wednesday, September 17, 2008 6:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 4, 2010 2:45 AM
Points: 1, Visits: 3
Hi All,
this article helps a lot to get an idea of solving my problems regarding sql-server data. my query looks like this:
SELECT
Company.UnternehmenName,
Company.UnternehmenID,
Department.Bereichname,
Department.BereichID,
Process.ProzessName,
Process.ProzessID,
SubProcess.SubProzessName,
SubProcess.SubProzessID
FROM Company

LEFT JOIN Department
ON Company.UnternehmenID = Department.BereichUnternehmenID
left JOIN Process
ON Department.BereichID = Process.BereichID
left join SubProcess
on Process.ProzessID = SubProcess.ProzessID
for xml auto,elements,type, ROOT('Company_Structure')

Anyhow the call of cmd.ExecuteXmlReader() runs into error. (InvalidOperationException)
What do I miss??
Regards Jörn
Post #571390
Posted Wednesday, September 17, 2008 10:21 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:42 AM
Points: 460, Visits: 2,523
Does this query run on SSMS? It looks like there is something going wrong with the query and it is not returning an XML stream.

.
Post #571460
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse