Re: Is there a way to convert ms sql 2008 tables to XML files?



re:
!> Is there a way to convert ms sql 2008 tables to XML files?

Create a stored procedure which contains the select statement you wish to use.

Make sure that the select statements creates the XML data
the way you want it, using the FOR XML AUTO clause.

Then use System.IO to write the returned data to a file.




Juan T. Llibre, asp.net MVP
¿ Estas probando VS 2010 y ASP.NET 4.0 ?
Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
http://asp.net.do/foros/forums/
=====================================================
"Eric S" <NoSpam@xxxxxxxxxxx> wrote in message news:%23qwivK26JHA.4632@xxxxxxxxxxxxxxxxxxxxxxx
Hi All,

Is there a way to convert ms sql 2008 tables to XML files?
Say I have several tables related to each other and I want to create the
hierarchy of the data such as parent child within the XML Any hidden class somewhere
to perform the above?

These are small tables where I store the data of menu options and sub
options etc...

Thanks,

Eric



.



Relevant Pages

  • Re: need advice
    ... I tried returning a SqldataReader but that failed with: To be XML serializable, types which inherit from IEnumerable must have an implementation of Addat all levels of their inheritance hierarchy. ... I was thinking about getting SQL 2000 to return an XML object but in it's first implementation of XML, ... I do not want to do any data manipulation - only return to the consumer the data from the stored procedure in the quickest way possible. ... I suggest that you determine where the performance problem is located before you try to solve the problem. ...
    (microsoft.public.dotnet.framework.webservices)
  • Sending and Receiving from SQL
    ... BizTalk help. ... Search for "Using the SQL Adapter with a Stored Procedure ... XML file then sent to an AIC component via BizTalk Port ...
    (microsoft.public.biztalk.general)
  • Re: XML Message to SQL in Attribute
    ... You are on the right track, with sending Xml to a SQL stored procedure. ... The XmlParser that writes the string encodes the string. ...
    (microsoft.public.biztalk.general)
  • SQL - XML Tag Parser Help
    ... The Stored Procedure should have 3 ins and one ... If XML tag found then return the value between the XML tags: ... Ultimately I will call one SQL Procedure to call the above SQL Procedure to ... USE SPTagParser ...
    (microsoft.public.dotnet.languages.csharp)
  • SQL - XML Tag Parser Help
    ... The Stored Procedure should have 3 ins and one ... If XML tag found then return the value between the XML tags: ... Ultimately I will call one SQL Procedure to call the above SQL Procedure to ... USE SPTagParser ...
    (microsoft.public.dotnet.distributed_apps)

Loading