Skip to main content

Hi,

When I add a new record to the shipment table, I want the following event to run, but it throws an error.

I try this too - >

Declare

Begin

UPDATE SHIPMENT_TAB SET AUTO_CONNECT_BLOCKED='TRUE' where SHIPMENT_ID=&NEW:SHIPMENT_ID;

End;

 

please your support :)

 

 

Please mention what is the error you received?


 

 


Problem is that you use the pragma to create a separate session. The shipment is only created in your session and since it is not yet committed it is not seen by the other session you start in the event.

You are creating a new session to avoid the mutating table error since you want to update the same table the event is triggering on.

It is impossible to do this directly in the event. It is only possible if you instead post a background job in the event that then executes after your session is ready.

Read more here: 

 

I’m not sure if that solves the issue for your business needs but it might.


Reply