ExecuteXMLReader

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Sql2000 Stored Proc. that returns the result in the form of XML. I
am calling this SP in my .NET application(webservice) using ADO.net. Can you
please suggest me if I should be using the ExecuteReader or ExecureXMLreader
method?
Also, what are the advantages of using ExecureXMLreader over ExecuteReader

In my .NET application, I need to populate the xml returned by SQL SP in a
XML document.

Thanks.
Rajiv
 
Let's make sure I understand this correctly...

You have an SP that returns XML.

If you use ExecuteReader you will get back this XML.

If you use ExecuteXMLReader you will get XML wrapped inside XML (from the
SP). Something like this:

<newXML>&lt;XMLfromSPTag&gt;value of tag&lt;/XMLfromSPTag&gt;</newXML>

Which one do you want?

Rick
 
Thanks for the reply Rick...

Actually, I want the first option that you mentioned below.

Regards,
Rajiv
 
Back
Top