Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ExecuteXmlReader() for multiple recordsets as XML

Status
Not open for further replies.

jasonsalas

IS-IT--Management
Jun 20, 2001
480
GU
I'm having an interesting problem using ADO.NET with XML in .NET 1.x. I'm trying to use multiple recordsets in the same SPROC, calling them via SqlCommand.ExecuteXmlReader(). Is there a way to emulate SqlDataReader.NextResult() to move through each recordset? I know that method isn't available in XmlReader.

I figure if this doesn't work, I can use a regular tabular recordset with a SqlDataReader and use a XmlTextWriter and construct everything by hand as one big document.
 
I would load the query into a dataset this will allow you to have each table returned as different tables in the dataset. You can then Bind them to any control or templated datalist that you have You can call different tables or run additional queries to create dataviews of each data table. *This goes the same for xml loaded by itself* ADO.NET communicates in xml and is especially helpful when working with multiple recordsets


MCP, .Net Solutions Development <%_%>
 
Hi werd420,

Yeah, I thought about this, but I'm trying to avoid using a DataSet for purposes of performance and the fact that I'm publishing a public XML feed for others to access. I'm actually progrmamatically applying an XSLT process to the XML and working with the UI this way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top