Application.ExportXML problem (sorting)

  • Thread starter Egbert Nierop \(MVP for IIS\)
  • Start date
E

Egbert Nierop \(MVP for IIS\)

Hi,

The statement above, generates an XML file.

But there are two problems.
First, it does not work on queries. On queries, it does not error, but
produce zero lines of XML.

Second, when I use a table with a primary key (that should be in effect
automatically) the XML-output, is not ordered. That is, it is mostly not
ordered, but sometimes it is.


1) How can that be fixed that below would work?

Application.ExportXML acExportQuery, "qTempSelect", _
path + "qTryGreekToEnglish.xml", , , , acUTF8

(fyi, above works on tables, but produces unordered XML data!)


2) The XLS produces HTML of those, but can XSL order xml data?

( <xsl:for-each select="temp">)
 
D

Dirk Goldgar

Egbert Nierop (MVP for IIS) said:
Hi,

The statement above, generates an XML file.

But there are two problems.
First, it does not work on queries. On queries, it does not error, but
produce zero lines of XML.

Second, when I use a table with a primary key (that should be in
effect automatically) the XML-output, is not ordered. That is, it is
mostly not ordered, but sometimes it is.


1) How can that be fixed that below would work?

Application.ExportXML acExportQuery, "qTempSelect", _
path + "qTryGreekToEnglish.xml", , , , acUTF8

(fyi, above works on tables, but produces unordered XML data!)

What version of Access are you using? I just tried exporting a query to
XML, using the following statement ...

Application.ExportXML acExportQuery, "qryDates", _
"C:\Temp\qryDates.xml",,,,acUTF8

.... and it worked fine, producing the XML I would expect. I did this
with Access 2002.
 
E

Egbert Nierop \(MVP for IIS\)

Dirk Goldgar said:
What version of Access are you using? I just tried exporting a query to
XML, using the following statement ...

Application.ExportXML acExportQuery, "qryDates", _
"C:\Temp\qryDates.xml",,,,acUTF8

... and it worked fine, producing the XML I would expect. I did this
with Access 2002.

Hi,

it is access 2003.
 

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