EXPORT RELATED TABLED TO XML

W

walter

Hi All,

I want automaticly export ( f.e by a button) related tables in my acces
database to a XML file.
In the main table are invoice headers and in the related table are
details.
So the result must be like this

-<header>
<line1>
<line2>
<line4>
-<detail>
<line1>
<line2>
/<detail>
-<detail>
<line1>
<line2>
/<header>


please give me a sugestion like a vb script fe

Thanks walter
 
D

David Lloyd

Walter:

The following code sample is from the Access Help topic for the ExportXML
method. It exports the three related tables in the sample Northwind
database: Customers, Orders, and Order Details. See the Access Visual Basic
Help topic for the ExportXML method for more information.

Sub ExportCustomerOrderData()
Dim objOrderInfo As AdditionalData
Dim objOrderDetailsInfo As AdditionalData

Set objOrderInfo = Application.CreateAdditionalData

' Add the Orders and Order Details tables to the data to be exported.
Set objOrderDetailsInfo = objOrderInfo.Add("Orders")
objOrderDetailsInfo.Add "Order Details"

' Export the contents of the Customers table. The Orders and Order
' Details tables will be included in the XML file.
Application.ExportXML ObjectType:=acExportTable,
DataSource:="Customers", _
DataTarget:="Customer Orders.xml", _
AdditionalData:=objOrderInfo
End Sub
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi All,

I want automaticly export ( f.e by a button) related tables in my acces
database to a XML file.
In the main table are invoice headers and in the related table are
details.
So the result must be like this

-<header>
<line1>
<line2>
<line4>
-<detail>
<line1>
<line2>
/<detail>
-<detail>
<line1>
<line2>
/<header>


please give me a sugestion like a vb script fe

Thanks walter
 
C

cicero antnio pereira

David Lloyd said:
Walter:

The following code sample is from the Access Help topic for the ExportXML
method. It exports the three related tables in the sample Northwind
database: Customers, Orders, and Order Details. See the Access Visual Basic
Help topic for the ExportXML method for more information.

Sub ExportCustomerOrderData()
Dim objOrderInfo As AdditionalData
Dim objOrderDetailsInfo As AdditionalData

Set objOrderInfo = Application.CreateAdditionalData

' Add the Orders and Order Details tables to the data to be exported.
Set objOrderDetailsInfo = objOrderInfo.Add("Orders")
objOrderDetailsInfo.Add "Order Details"

' Export the contents of the Customers table. The Orders and Order
' Details tables will be included in the XML file.
Application.ExportXML ObjectType:=acExportTable,
DataSource:="Customers", _
DataTarget:="Customer Orders.xml", _
AdditionalData:=objOrderInfo
End Sub
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi All,

I want automaticly export ( f.e by a button) related tables in my acces
database to a XML file.
In the main table are invoice headers and in the related table are
details.
So the result must be like this

-<header>
<line1>
<line2>
<line4>
-<detail>
<line1>
<line2>
/<detail>
-<detail>
<line1>
<line2>
/<header>


please give me a sugestion like a vb script fe

Thanks walter
 

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

Similar Threads


Top