HighTechTalks DotNet Forums  

Export a Table to XML from SQL Server

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss Export a Table to XML from SQL Server in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
skneife@gmail.com
 
Posts: n/a

Default Export a Table to XML from SQL Server - 12-16-2007 , 06:31 AM






Is there a way to Export a Table to XML from SQL Server express ?

Thanks for help.
Sam

Reply With Quote
  #2  
Old   
William Vaughn
 
Posts: n/a

Default Re: Export a Table to XML from SQL Server - 12-16-2007 , 03:18 PM






Sure, from any version of SQL Server accessed by the SqlClient .NET Data
Provider you can execute the WriteXML method against a DataSet as described
here:
ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_system.data/html/a2d528e2-f686-4a22-c3ea-0cb9a6317a0a.htm

hth

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________ __________________________________________
<skneife (AT) gmail (DOT) com> wrote

Quote:
Is there a way to Export a Table to XML from SQL Server express ?

Thanks for help.
Sam


Reply With Quote
  #3  
Old   
skneife@gmail.com
 
Posts: n/a

Default Re: Export a Table to XML from SQL Server - 12-17-2007 , 05:23 PM



On 16 déc, 21:18, "William Vaughn" <billvaNoS... (AT) betav (DOT) com> wrote:
Quote:
Sure, from any version of SQL Server accessed by the SqlClient .NET Data
Provider you can execute the WriteXML method against a DataSet as described
here:
ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_system.data/html/a2d528e2-f686-4a22-c3ea-0cb9a6317a0a.htm

hth
Thank you

Sam


Reply With Quote
  #4  
Old   
Cor Ligthert[MVP]
 
Posts: n/a

Default Re: Export a Table to XML from SQL Server - 12-18-2007 , 11:53 PM



skneife

In the most simplest way.

MyDataSet.Write(Path) with an extra ; at the end for C#

If you have only a datatable, then you have first to create a dataset and
then add the table to that.

dim ds as New dataset()
(DataSet ds = new DataSet()

ds.Add(mytable) again with an extra ; at the end for C#

Cor

<skneife (AT) gmail (DOT) com> schreef in bericht
news:3385e727-e0e2-43aa-9af2-05bedeaf1c98 (AT) s19g2000prg (DOT) googlegroups.com...
Quote:
Is there a way to Export a Table to XML from SQL Server express ?

Thanks for help.
Sam


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.