If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Update Trigger fires twice

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-02-04, 10:07
Yammieken Yammieken is offline
Registered User
 
Join Date: Jul 2004
Posts: 4
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
Reply With Quote
  #2 (permalink)  
Old 08-02-04, 10:56
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
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.
Reply With Quote
  #3 (permalink)  
Old 08-03-04, 05:23
Yammieken Yammieken is offline
Registered User
 
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...
Reply With Quote
  #4 (permalink)  
Old 08-03-04, 09:12
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On