Import XML in Access 2000

M

Mike P

Hello

I have figured out how to generate an XML file thanks to help from this group. What I am trying to figure out now is how to take an XML file and import it into Access.

Below is my logic to Export, can someone tell me what my logic would be to Import
-------------------------------------------------------
Private Sub cmdExportXML_Click(
Dim conn As ADODB.Connection, rst As New ADODB.Recordse
Dim qryName, strFileName, strFileLocation As Strin

Set conn = Application.CurrentProject.Connectio
qryName = "qryNodeTableXmlExport
strFileName = “ExportFile
strFileLocation = "c:/Tmp/dbTest/

With rs
.Open qryName, conn, adOpenDynamic, adLockOptimisti
.Save strFileLocation & strFileName & ".xml", adPersistXM
.Clos
End Wit
End Su

Thanks in advance for your time and effort. I am new to Access and appreciate the help. I am using Access 2000 SP-3

Michae
 
J

Joe Fallon

Simple - upgrade to Acces 2003!

A2002 has an import XML feature which was enhanced in A2003.

Importing XML in A2000 and earlier is very difficult.
I wrote code to walk the DOM and build a table and write the data but it was
very specific to the file I was using.
Took a few days to write and test too.
Upgrading is really the best solution.
--
Joe Fallon
Access MVP



Mike P said:
Hello,

I have figured out how to generate an XML file thanks to help from this
group. What I am trying to figure out now is how to take an XML file and
import it into Access.
Below is my logic to Export, can someone tell me what my logic would be to Import?
--------------------------------------------------------
Private Sub cmdExportXML_Click()
Dim conn As ADODB.Connection, rst As New ADODB.Recordset
Dim qryName, strFileName, strFileLocation As String

Set conn = Application.CurrentProject.Connection
qryName = "qryNodeTableXmlExport"
strFileName = "ExportFile"
strFileLocation = "c:/Tmp/dbTest/"

With rst
.Open qryName, conn, adOpenDynamic, adLockOptimistic
.Save strFileLocation & strFileName & ".xml", adPersistXML
.Close
End With
End Sub

Thanks in advance for your time and effort. I am new to Access and
appreciate the help. I am using Access 2000 SP-3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top