Problem: XML -> DataSet -> Access Database

swingard

Member
Joined
Dec 21, 2006
Messages
6
Programming Experience
1-3
I have an XML file that I want to use to update my Access database. I'm loading the XML file into a DataSet and then trying to update the database with the Update method of the DataAdapter. Something like this:

DataSet.ReadXml(file.xml)
DataAdapter.Update(DataSet)

But the changes don't take affect in the database. What's wrong? As a test I loaded some data directly from the database into a dataset, changed some data, then updated using the function above and it worked fine. But when the data source is XML, it doesn't seem to work. Help!

Stephen
 
let me rephrase

Since it's been several days and no one seems to have an answer to my problem...let me rephrase...

I know now why the dataadapter.update command doesn't work. Update only works when changes are present in the dataset (if one were to use the AcceptChanges method before update, this wouldn't work either).

So now my question is more general: What's the best way to get XML data into an Access database (updating)? :confused:
 
I am having the same issue. I have xml file which I have loaded into a dataset. Now I want to store that in a blank access database. Is there away to do that directly without creating the tables/columns first?
 
Back
Top