B
Big D
Hi all,
I have an xml file that I load into a strongly typed dataset via the ReadXML
method of the dataset. I then want to add a new row to the dataset and save
it back to disk.
Each row in the dataset is defined as an "entry", so I have a entryDataRow
member of my Entries dataset. However, I can't seem to figure out how to
create a new instance of an entryDataRow, modify it and add it to the
dataset. I can't find anything in my books, or MSDN about this subject...
maybe I am going about it the wrong way?
I'm used to doing this sort of thing for databases through a sqlDataAdapter,
and using "update" to modify the datasource, but I don't get how to have an
adapter to the XML file.
Your help is greatly appreciated!
-D
psudo - code of what I'm wanting to do:
dim ds as new Entries
ds.readXML("theXMLFile.xml")
dim dr as new Entries.entryRow
dr.item1 = "blah"
dr.Item2 = "blah"
ds.rows.add(dr)
ds.saveXML("theXMLFile.xml")
I have an xml file that I load into a strongly typed dataset via the ReadXML
method of the dataset. I then want to add a new row to the dataset and save
it back to disk.
Each row in the dataset is defined as an "entry", so I have a entryDataRow
member of my Entries dataset. However, I can't seem to figure out how to
create a new instance of an entryDataRow, modify it and add it to the
dataset. I can't find anything in my books, or MSDN about this subject...
maybe I am going about it the wrong way?
I'm used to doing this sort of thing for databases through a sqlDataAdapter,
and using "update" to modify the datasource, but I don't get how to have an
adapter to the XML file.
Your help is greatly appreciated!
-D
psudo - code of what I'm wanting to do:
dim ds as new Entries
ds.readXML("theXMLFile.xml")
dim dr as new Entries.entryRow
dr.item1 = "blah"
dr.Item2 = "blah"
ds.rows.add(dr)
ds.saveXML("theXMLFile.xml")