471,610 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Help have to move away from SQLXML

We current have a bunch of web services that make user of the SQLXML object.
A template is created in code which calls several stored procedures each of
which returns multiple xml recordsets from our SQL Server 2000 database.
When the template is run an XSL transformation is automatically applied as
well. The resulting document is then served to the caller.

Due to the gods in charge they have decided in there infinite wisdom to
disallow the use of the SQLXML object. So my question is how do I go about
calling several stored procedures with SqlClient each of which returns
multiple for xml recordsets, stuff all of the data into a single xmldocument
then apply a transformation!!!

Cheers
Keith
Nov 12 '05 #1
3 1263
FOR XML still returns the values in a column just like any other query
you may have to append the string and iterate through the rows (in most
instances it should all be on one record but I've seen large results that
span multiple rows).

If you have multiple FOR XML queries in your stored procedure, then
fill a dataset. You can iterate through each table in the DataSet to get
what
you want.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx

"Keith Chadwick" <Ke***********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com...
We current have a bunch of web services that make user of the SQLXML
object.
A template is created in code which calls several stored procedures each
of
which returns multiple xml recordsets from our SQL Server 2000 database.
When the template is run an XSL transformation is automatically applied as
well. The resulting document is then served to the caller.

Due to the gods in charge they have decided in there infinite wisdom to
disallow the use of the SQLXML object. So my question is how do I go
about
calling several stored procedures with SqlClient each of which returns
multiple for xml recordsets, stuff all of the data into a single
xmldocument
then apply a transformation!!!

Cheers
Keith

Nov 12 '05 #2
So I do have to iterate through the records in each recordset then. I was
hoping to avoid that and simply use some sort of stream object to stream the
data into the xmlDocument then apply the transformation. Most of our xml
recordsets are multiple rows and some may be very large but less than if it
was a standard ado.recordset object.

Cheers, thanks for your help
Keith Chadwick
"Robbe Morris [C# MVP]" <in**@turnkeytools.com> wrote in message
news:ud*************@tk2msftngp13.phx.gbl...
FOR XML still returns the values in a column just like any other query
you may have to append the string and iterate through the rows (in most
instances it should all be on one record but I've seen large results that
span multiple rows).

If you have multiple FOR XML queries in your stored procedure, then
fill a dataset. You can iterate through each table in the DataSet to get
what
you want.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx

"Keith Chadwick" <Ke***********@discussions.microsoft.com> wrote in
message news:CE**********************************@microsof t.com...
We current have a bunch of web services that make user of the SQLXML
object.
A template is created in code which calls several stored procedures each
of
which returns multiple xml recordsets from our SQL Server 2000 database.
When the template is run an XSL transformation is automatically applied
as
well. The resulting document is then served to the caller.

Due to the gods in charge they have decided in there infinite wisdom to
disallow the use of the SQLXML object. So my question is how do I go
about
calling several stored procedures with SqlClient each of which returns
multiple for xml recordsets, stuff all of the data into a single
xmldocument
then apply a transformation!!!

Cheers
Keith


Nov 12 '05 #3
True. I'm assuming that your FOR XML clause and xml needs
exceed what you would get without using FOR XML and using
a standard DataSet and its .WriteXml method.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx

"Keith Chadwick" <we**************@allianceevents.com> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
So I do have to iterate through the records in each recordset then. I was
hoping to avoid that and simply use some sort of stream object to stream
the data into the xmlDocument then apply the transformation. Most of our
xml recordsets are multiple rows and some may be very large but less than
if it was a standard ado.recordset object.

Cheers, thanks for your help
Keith Chadwick
"Robbe Morris [C# MVP]" <in**@turnkeytools.com> wrote in message
news:ud*************@tk2msftngp13.phx.gbl...
FOR XML still returns the values in a column just like any other query
you may have to append the string and iterate through the rows (in most
instances it should all be on one record but I've seen large results that
span multiple rows).

If you have multiple FOR XML queries in your stored procedure, then
fill a dataset. You can iterate through each table in the DataSet to get
what
you want.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx

"Keith Chadwick" <Ke***********@discussions.microsoft.com> wrote in
message news:CE**********************************@microsof t.com...
We current have a bunch of web services that make user of the SQLXML
object.
A template is created in code which calls several stored procedures each
of
which returns multiple xml recordsets from our SQL Server 2000 database.
When the template is run an XSL transformation is automatically applied
as
well. The resulting document is then served to the caller.

Due to the gods in charge they have decided in there infinite wisdom to
disallow the use of the SQLXML object. So my question is how do I go
about
calling several stored procedures with SqlClient each of which returns
multiple for xml recordsets, stuff all of the data into a single
xmldocument
then apply a transformation!!!

Cheers
Keith



Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark Sisson | last post: by
reply views Thread by Ralph Krausse | last post: by
1 post views Thread by norm dingle | last post: by
2 posts views Thread by Keith Chadwick | last post: by
1 post views Thread by Hollywood | last post: by
3 posts views Thread by Michael Persaud | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.