473,381 Members | 1,450 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,381 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 1324
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Sisson | last post by:
Ok gurus, what would you do? I'm developing an app in C# and trying to use SqlXml but there seems to be a problem at every turn. I want to create a biz object that represents an order to sell a...
0
by: Ralph Krausse | last post by:
Hello all, Newbie here and have a few questions. I wish to use the classes SqlXmlAdapter,SqlXmlCommand,etc in my ASP.NET project but when I add 'using Microsoft.Data.SqlXml', the IDE doesn't see...
0
by: Nick Chan | last post by:
hello i exposed some stored procs as web methods, is there a way to use authentication? i just want to set only me can use it. And is there a way to save the SQLXML IIS Settings and export to...
1
by: norm dingle | last post by:
Does anyone know how to get the managed classes for sqlxml loaded? I can not seem to get them to load. Thanks norm
2
by: Keith Chadwick | last post by:
I noticed an earlier post, Multiple External References in Transform - Background to the problem - Long Post, where the poster referenced an object entitled SqlXmlCommand. I am unable to find this...
1
by: Hollywood | last post by:
I have the following XSD created in VS.NET 2003: <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="ReferralSchama" targetNamespace="http://test.org/Referral"...
3
by: Michael Persaud | last post by:
HI, I have a xml file and would like to import its contents into a table in SQl2000 can some one say how? it has to insert multiple records Thanks MP
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
5
by: muna123 | last post by:
hi, I need help in battleship game here is my code: #include <stdio.h> void draw_game(char board, int maway, int mleft, int score, char prevmove);
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.