Home > .NET, VB.NET > Dump a .NET DataTable in VB.NET as XML file

Dump a .NET DataTable in VB.NET as XML file

2017/07/26


If we have a DataTable named rstData in our VB.NET code:

Dim ds As New DataSet
ds.Tables.Add(rstData)
ds.Tables(0).TableName = "ATableNameYouWant"
ds.WriteXml("e:\MyTableDump.xml")

Advertisements
Categories: .NET, VB.NET
%d bloggers like this: