Save datatable to file

Mondeo

Well-known member
Joined
Nov 10, 2006
Messages
128
Location
Sunny Lancashire
Is there a simple way to output a datatable to a file, i.e. a text file or XML file etc.

Then a simple way to load the file back into a datatable?

Thanks
 
Theres a method named ReadXML and WriteXML. You could look for them in MSDN. The samples are enough to get you started.

The methods are part of the DataSet class. Ive been using it to dump my dataset to an XML file and creating my dataset from an XML file.
 
Back
Top