Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2006, 07:16 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default Trigger/XML Export

Hi,

1. How can I execute a Trigger on an Access table on an UPDATE (on a specified field), using VBA/SQL?

2. I then need to produce/export a XML document from the table (or tables using a one-to-many relationship), how do I do this?
Note: This has to be performed on the UPDATE.

EXAMPLE:

[u]Table_A</u>
Field1 = Order Number
Field2 = Status field (when Updated to ‘C’)

[u]Table_B</u>
Field1 = Order Number
Field2 = Line Number

Thanks in advance,


Neal

A Northern Soul
__________________
Neal

A Northern Soul
 
Old March 30th, 2006, 11:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Access (Jet) tables don't support Triggers.

Bob

 
Old March 30th, 2006, 11:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

To sort of emulate the trigger-like behavior you're after with Jet, you'd need to control the update programmatically: open an ADO recorset based on your tables, update the recordset in code, then persist the recordset in XML format using something like:

rst.Save "C:\SomeDocument.xml", adPersistXML

Bob








Similar Threads
Thread Thread Starter Forum Replies Last Post
Export SQL To XML shillr SQL Server 2000 0 August 1st, 2006 10:14 AM
Trigger/XML Neal Access 1 March 30th, 2006 11:00 PM
Export to XML from DB HamishF SQL Server 2000 8 December 21st, 2003 05:42 PM
How to export xml to excel using ASP porsrari XML 1 September 5th, 2003 06:26 AM
How to export XML to Excel using ASP? porsrari Classic ASP Basics 2 September 4th, 2003 09:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.