Full Version: Xml Import Issues
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
Steve25
Hi,

I'm trying to import/merge/update a table from an xml file.

To import I'm using the following code:
This works perfectly to import new records, however what I also need it to do is merge/update the data. So the xml file will contain the correct data and any amendments need to be made to the Access table.

Any help greatly appreciated.

Steve

PS I'm using Access 2010
ScottGem
I would import the file to a temp table, then run an Update query that links the two and an Append query.
Steve25
Thanks for the reply.

That sounds like the sort of way to go.

With the temp table can Access be set to create it then delete it? As this import needs to be carried out regularly.

Thanks

Steve
ScottGem
Sure, You can use DoCmd.DeleteObject.

And then use a MakeTable query to create it. But if the structure will always be the same, it may be better to leave the table and delete all records before the Append.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.