Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    4

    Unanswered: Update Trigger fires twice

    Hallo everyone,

    Yet again I have a problem ... I'm working with triggers in mijn database, but it seems like my after insert trigger is always fired twice. Right now it's the only trigger on my database and it consists out of two print-messages: print 'begin'; and print 'end';

    So there is no other trigger or something to fire the second time and yet still I get 'begin' ' end' 'begin' 'end' so my trigger always fires twice. does anyone have an idea to preventthis from happening??

    Greetz

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Can you post your Create Trigger statement? Also, how are you inserting the record?
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Jul 2004
    Posts
    4
    DROP TRIGGER AU_TasksDetails
    #
    CREATE TRIGGER AU_TasksDetails
    AFTER UPDATE ON TasksDetails
    FOR EACH ROW

    BEGIN
    print 'begin';

    print 'end';
    END

    Thats the trigger verrrrry simple ... I've also noticed that the same trigger on a different table does work correctly! I'm testing it by manually update the table in pervasive control centre...

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    I tried here on some of my data (changing the table name) and only saw one "begin" and one "end". What version of Pervasive are you using? Also, if it's happening only on this one table, you might check for extra Triggers by issuing a "Select * from x$trigger" statement in the PCC/SQLDM. Check for multiple entries with the same xt$file value.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •