Application.ExportXML problem (sorting)

  • Thread starter Thread starter Egbert Nierop \(MVP for IIS\)
  • Start date 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">)
 
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.
 
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.
 
Back
Top