PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
datatable write to xml file - visual studio 2003
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
datatable write to xml file - visual studio 2003
![]() |
datatable write to xml file - visual studio 2003 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
hi
can anybody pls help me? i am trying to write a datatable to xml file in visual studio 2005 it goes like this: datatable dt = new datatable(); dt.writexml(saveFileDialog1.FileName); in visual studio 2003 dt doesn'n have this property "writexml" how do i do it? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You can stick it in a DataSet and call the writexml on the dataset. You can
then strip out the elements you don't need (or leave them in depending on how they'll affect your app). -- Cordially, W.G. Ryan - MVP Windows Embedded Author - MCTS Self-Paced Training Kit (Exam 70-536) http://www.amazon.com/gp/product/07...=books&v=glance http://search.barnesandnoble.com/bo...735622779&itm=1 "Orr" <orrrachman@gmail.com> wrote in message news:1150816647.230011.110890@b68g2000cwa.googlegroups.com... > hi > can anybody pls help me? > i am trying to write a datatable to xml file > in visual studio 2005 it goes like this: > datatable dt = new datatable(); > dt.writexml(saveFileDialog1.FileName); > > in visual studio 2003 dt doesn'n have this property "writexml" > > how do i do it? > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Orr,
dataset ds = new dataset(); > datatable dt = new datatable(); ds.Add(dt); > ds.writexml(saveFileDialog1.FileName); The result is the same as in 2005 this is done automatic there. I hope this helps, Cor |
|
|
|
#4 |
|
Guest
Posts: n/a
|
small correction.
ds.tables.Add(dt); Cor "Cor Ligthert [MVP]" <notmyfirstname@planet.nl> schreef in bericht news:%23kDfSCIlGHA.1640@TK2MSFTNGP02.phx.gbl... > Orr, > > dataset ds = new dataset(); >> datatable dt = new datatable(); > ds.Add(dt); >> ds.writexml(saveFileDialog1.FileName); > > The result is the same as in 2005 this is done automatic there. > > I hope this helps, > > Cor > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
W.G. Ryan - MVP כתב: > You can stick it in a DataSet and call the writexml on the dataset. You can > then strip out the elements you don't need (or leave them in depending on > how they'll affect your app). > > -- > Cordially, > > W.G. Ryan - MVP > Windows Embedded > > Author - MCTS Self-Paced Training Kit (Exam 70-536) > http://www.amazon.com/gp/product/07...=books&v=glance > http://search.barnesandnoble.com/bo...735622779&itm=1 > "Orr" <orrrachman@gmail.com> wrote in message > news:1150816647.230011.110890@b68g2000cwa.googlegroups.com... > > hi > > can anybody pls help me? > > i am trying to write a datatable to xml file > > in visual studio 2005 it goes like this: > > datatable dt = new datatable(); > > dt.writexml(saveFileDialog1.FileName); > > > > in visual studio 2003 dt doesn'n have this property "writexml" > > > > how do i do it? > > Thanks to anybody who helped me!!! Orr |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

