Database triggers not fired when creating a record in busine

Posted by gdb390 on 06-Sep-2016 05:28

Hi,

OpenEdge 11.6 

I have created a database table with a create & write trigger.  In the create trigger the PK (which is an ID) is filled with a number from a sequence .

I created a business entity eg Customer.cls based on the table.

You get a temp-table with the before-table and some methods to handle data access.

One of them is the create method.

If I create a temp-table record (tracking-changes = true) and pass it to the create method, the record is created in the database, but the trigger is not fired.

Why is that ? 

Am I missing something ?

All Replies

Posted by Mike Fechner on 06-Sep-2016 05:38
Are you sure that the trigger is not firing?
 
The alternative reason might be that the BUFFER-COPY happening during the SAVE-ROW-CHANGES (after the CREATE done by the SAVE-ROW-CHANGES) overwrites the value.
 
You should use the skip fields parameter on the SAVE-ROW-CHANGES to protect your PUK field from getting overwritten.
 
We have no problem with create triggers and prodatasets that way.
 
 
Von: gdb390 [mailto:bounce-gdb390@community.progress.com]
Gesendet: Dienstag, 6. September 2016 12:30
An: TU.OE.Development@community.progress.com
Betreff: [Technical Users - OE Development] Database triggers not fired when creating a record in business entity
 
Update from Progress Community
 

Hi,

OpenEdge 11.6 

I have created a database table with a create & write trigger.  In the create trigger the PK (which is an ID) is filled with a number from a sequence .

I created a business entity eg Customer.cls based on the table.

You get a temp-table with the before-table and some methods to handle data access.

One of them is the create method.

If I create a temp-table record (tracking-changes = true) and pass it to the create method, the record is created in the database, but the trigger is not fired.

Why is that ? 

Am I missing something ?

View online

 

You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

Flag this post as spam/abuse.

 
Posted by gdb390 on 06-Sep-2016 06:30

I will try that this evening and let you knwo something

Posted by gdb390 on 06-Sep-2016 16:01

Mike, that did the trick ... Thanks ! That's another beer on the PUG !

This thread is closed