-
July 25th, 2004, 04:06 PM
#1
XML Import/Export
Is there a way to save multiple tables of an MS Access database to a single XML file through VB code. My goal is to be able to email one XML file containing records of several tables and for the end user to be able to import this XML file into their access database through VB code. Thanks.
-
July 25th, 2004, 09:52 PM
#2
it very difficult that you want to do that with xml
maybe using base64 code is able to accomplish it
-
July 25th, 2004, 11:03 PM
#3
Its actually very easy - MS have a good article on msdn here - all you have to do is create a variable, turn it into an XMLDOMDocument, then append all the nodes from doing the rs.save <varName>, adpersistxml
Unfortunately I can't give you the code cos its all work related here.
Be nice to Harley riders...
-
May 25th, 2009, 06:26 AM
#4
Re: XML Import/Export
Hi - I found this thread seeking the same type of solution. Have found an apprently very neat solution - only a few lines of code. Goes thus:
Dim AdditionalExportTables As AdditionalData
Set AdditionalExportTables = Application.CreateAdditionalData
AdditionalExportTables.Add ("tbl20Clients")
AdditionalExportTables.Add ("tbl20POP")
AdditionalExportTables.Add ("tbl40Meters")
AdditionalExportTables.Add ("tbl41Readings")
AdditionalExportTables.Add ("tbl10Scenarios")
AdditionalExportTables.ExportXML ObjectType:=acExportTable, _
DataSource:="tbl10Reports", _
DataTarget:="" & CurrentProject.Path & "\SurveyData.xml", _
AdditionalData:=AdditionalExportTables
Probably not as elegant as Twodogs' solution but I thought I'd post as I'm not restricted by my employer in my ability to post code.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|