all groups > dotnet xml > march 2004 >
You're in the

dotnet xml

group:

How to capture SELECT ... FOR XML RAW



How to capture SELECT ... FOR XML RAW Gopinath Munisifreddy
3/26/2004 7:56:02 PM
dotnet xml: Hi,
Can u tell how to capture output of the following query into a variable and
reuse the variable
"select TOP 1 FirstName, LastName FROM pATIENT FOR XML AUTO"
Thanks
Gopinath M

Re: How to capture SELECT ... FOR XML RAW Jim Hughes
3/27/2004 9:08:02 AM
Download the Microsoft Data Access Application Block (DAAB) and look at the
ExecuteXmlReader method.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp

[quoted text, click to view]

Re: How to capture SELECT ... FOR XML RAW Dino Chiesa [Microsoft]
3/31/2004 4:28:04 PM
System.Data.SqlClient.SqlCommand cmd= new
System.Data.SqlClient.SqlCommand(strSQL, dbconn);
cmd.Connection.Open();
xtr = (System.Xml.XmlTextReader) cmd.ExecuteXmlReader();
doc = new System.Xml.XmlDocument();
doc.Load(xtr);


[quoted text, click to view]

AddThis Social Bookmark Button