473,396 Members | 2,109 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,396 software developers and data experts.

SQL to XML Resources

I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might help
me get a handle on this. On-line resources would be especially welcome, but
book recommendations are OK too.

--
Brendan Reynolds

Nov 19 '05 #1
7 1001
You probably want to look at the SQL query to return XML. Look up the
clause with SQL Server Books Online, and what you want is something like
the following:

SELECT (XML Schema from third party applied to columns)
FROM dbo.YourTable
FOR XML EXPLICIT, ELEMENTS

The part between the parentheses will be tricky, I have personally only
done it once.

Clint Hill
H3O Software
http://www.h3osoftware.com

Brendan Reynolds wrote:
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might help
me get a handle on this. On-line resources would be especially welcome, but
book recommendations are OK too.

Nov 19 '05 #2
Thanks Clint.

--
Brendan Reynolds
"Clint Hill" <cl********@nospamath3osoftware.com> wrote in message
news:uf**************@TK2MSFTNGP14.phx.gbl...
You probably want to look at the SQL query to return XML. Look up the
clause with SQL Server Books Online, and what you want is something like
the following:

SELECT (XML Schema from third party applied to columns)
FROM dbo.YourTable
FOR XML EXPLICIT, ELEMENTS

The part between the parentheses will be tricky, I have personally only
done it once.

Clint Hill
H3O Software
http://www.h3osoftware.com

Brendan Reynolds wrote:
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't
expect anyone to provide a step-by-step solution in a newsgroup post, but
I'm hoping that someone may be able to recommend some resources that
might help me get a handle on this. On-line resources would be especially
welcome, but book recommendations are OK too.

Nov 19 '05 #3

"Brendan Reynolds" <br******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't expect anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might help me get a handle on this. On-line resources would be especially welcome, but book recommendations are OK too.

--
Brendan Reynolds

You could also fill a dataset from the sql data and then use the
dataset.writexml method to save to a file or a stream.
Mike
Nov 19 '05 #4
Absolutely. However, it could be more difficult to manage the 3rd party
schema with a DataSet. Certainly could be done, however I would rather
SQL just hand over the xml and do a write to the page with it on POST.

Good idea though because it is certainly quicker to do than the SQL route.

Clint Hill
H3O Software
http://www.h3osoftware.com

vMike wrote:
"Brendan Reynolds" <br******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't


expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might


help
me get a handle on this. On-line resources would be especially welcome,


but
book recommendations are OK too.

--
Brendan Reynolds


You could also fill a dataset from the sql data and then use the
dataset.writexml method to save to a file or a stream.
Mike

Nov 19 '05 #5
Absolutely. However, it could be more difficult to manage the 3rd party
schema with a DataSet. Certainly could be done, however I would rather
SQL just hand over the xml and do a write to the page with it on POST.

Good idea though because it is certainly quicker to do than the SQL route.

Clint Hill
H3O Software
http://www.h3osoftware.com

vMike wrote:
"Brendan Reynolds" <br******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't


expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might


help
me get a handle on this. On-line resources would be especially welcome,


but
book recommendations are OK too.

--
Brendan Reynolds


You could also fill a dataset from the sql data and then use the
dataset.writexml method to save to a file or a stream.
Mike

Nov 19 '05 #6
Thanks - I probably will do it that way, at least in the short term. I was
at first reluctant to do that because the app isn't using datasets for any
other purpose, and it didn't seem very efficient to create and fill a
dataset just to act as a sort of staging area between the database and the
XML document. But it does look as though the dataset method may be easier,
and I need to get something up and running quickly. I might use the dataset
now and investigate the SQL Server FOR XML option later. I appreciate both
suggestions - it's always good to have choices! :-)

--
Brendan Reynolds

"vMike" <Mi************@5nerrawgenospam.com> wrote in message
news:3%*******************@newsread1.news.atl.eart hlink.net...

"Brendan Reynolds" <br******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't

expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might

help
me get a handle on this. On-line resources would be especially welcome,

but
book recommendations are OK too.

--
Brendan Reynolds

You could also fill a dataset from the sql data and then use the
dataset.writexml method to save to a file or a stream.
Mike

Nov 19 '05 #7
Thanks - I probably will do it that way, at least in the short term. I was
at first reluctant to do that because the app isn't using datasets for any
other purpose, and it didn't seem very efficient to create and fill a
dataset just to act as a sort of staging area between the database and the
XML document. But it does look as though the dataset method may be easier,
and I need to get something up and running quickly. I might use the dataset
now and investigate the SQL Server FOR XML option later. I appreciate both
suggestions - it's always good to have choices! :-)

--
Brendan Reynolds

"vMike" <Mi************@5nerrawgenospam.com> wrote in message
news:3%*******************@newsread1.news.atl.eart hlink.net...

"Brendan Reynolds" <br******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have an ASP.NET app that needs to extract data from multiple related
tables in a SQL Server database and POST the data as XML to a third-party
app, using a schema specified by the third party. I realise that this is
quite a general and wide-ranging description of the problem. I don't

expect
anyone to provide a step-by-step solution in a newsgroup post, but I'm
hoping that someone may be able to recommend some resources that might

help
me get a handle on this. On-line resources would be especially welcome,

but
book recommendations are OK too.

--
Brendan Reynolds

You could also fill a dataset from the sql data and then use the
dataset.writexml method to save to a file or a stream.
Mike

Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Derick Smith | last post by:
Hi! I am just starting to use .NET and need some help! If I create my own DLL for String resouces using this command: C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib...
3
by: Jesse | last post by:
Hi together, I've a problem with compiling an application with a build-Script and run it after. Several resource-files I compile with resgen.exe and put the files into a folders of the...
1
by: Stefan Turalski \(stic\) | last post by:
Hi, What I need to do is adding some support for resources files to my application. What I did is: MyAppMain <- startup project MyAppHelper <- project which has MyAppResourcesClass (al a...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
4
by: Jon Rista | last post by:
I have a project where I need to create a windows .exe by compiling code and linking in some resources. This program thats being generated is somewhat unconventional, and I'll explain how. I'm...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
0
by: Derick Smith | last post by:
Hi! I am just starting to use .NET and need some help! If I create my own DLL for String resouces using this command: C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib...
0
by: Rob Dob | last post by:
Hi, I have a VS2003 C# asp.net project that has been converted into a VS2005 project. Everything seemed to work well until I make a modification to anything within the Component Designer...
1
by: spencermiles | last post by:
Hello, I'm working on a large solution, comprised on numerous Projects, and I would like to have one central projects that contains a set of global RESX Resources. It doesn't make sense to have...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.