Michael Persaud wrote:
Hi,
I am trying to retrive data from a datatable. I want to have the information
listed out in text so that i can send it via mail
Any suggestions appreciated
MP
add it to a dataset and then export the dataset to xml....this example
is for writing to file:
DataSet ds = new DataSet();
ds.Tables.Add(yourExistingTable);
ds.WriteXml("file.xml", XmlWriteMode.IgnoreSchema);
http://msdn.microsoft.com/library/de...tasetasxml.asp
you could also feed this method a stream and read it into memory
(instead of outputting to a file). The overloads are here:
http://msdn.microsoft.com/library/de...texmltopic.asp
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET