Writing from database to file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm using a SQL 2000 DataBase in my program, and in some cases i need to
bring some information from my dataBase and write it in specific way to a
file. i know how to write to a file, but i wonder which way is the best to do
it? i need to edit the information before i write it to the file, so i guess
i have to store it somewhere, the question is if i'll use a dataSet could i
get to the information directly or should i enter it to a temp DataTable or
DataGrid, or maybe there is another way....

Thanks,
Gidi.
 
Gidi,

Al you need is

ds.WriteXml(path);
and if you need the schema when readed back (this cost more bytes)
ds.WriteXml(path,XmlWriteMode.WriteSchema);

I hope this helps,

Cor
 
Back
Top