Export a Table to XML from SQL Server

  • Thread starter Thread starter skneife
  • Start date Start date
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)
____________________________________________________________________________________________
 
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
 
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
 
Back
Top