Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 September 20th, 2004, 07:19 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help w/ DB2 Triggers

Hi. I am trying to create a trigger when a table in the DB is updated. (We have an IBM DB2 mainframe database.) I am quite new to creating triggers, so please bear with me. Here is my code:

CREATE TRIGGER FS3DAP08
    NO CASCADE BEFORE UPDATE ON TABLE1
    REFERENCING OLD AS o
            NEW AS n
    FOR EACH ROW MODE DB2SQL
    BEGIN ATOMIC
     INSERT INTO TABLE2 (F1, F2, F3, F4, F5, F6, F7)
     VALUES
    (o.F1, o.F2, o.F3, USER, CURRENT TIMESTAMP, 'UPDATE', '1');
     INSERT INTO TABLE2 (F1, F2, F3, F4, F5, F6, F7)
     VALUES
    (o.F1, o.F2, o.F3, USER, CURRENT TIMESTAMP, 'UPDATE', '2');
        END
;

Any suggestions or help would be greatly appreciated. Thanks!
 
Old September 21st, 2004, 01:13 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

rrr24,
I don't think you are in the right topic. This topic forum is for MS Access Database not IBM DB2. Also, there are no triggers in MS Access Database.
John






Similar Threads
Thread Thread Starter Forum Replies Last Post
Db2 Biju6 SQL Server 2000 0 September 23rd, 2007 09:53 PM
Date From DB2 gog SQL Server 2000 6 April 30th, 2007 06:13 AM
Trigger in DB2 htyeoh SQL Language 0 March 13th, 2007 09:09 PM
Websphere DB2 vijayakumaroa J2EE 0 November 15th, 2005 01:08 PM
asp and DB2 beta611 Classic ASP Basics 0 August 20th, 2003 09:22 AM





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