Kbase P31932: Attempt to CREATE a record in while a trigger is executing
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/07/2003 |
|
Status: Unverified
SYMPTOM(s):
Attempt to CREATE a <table> record in <procedure> while a trigger is executing. (3168)
Attempt to CREATE a opodcd record in triggers/write-opod.p while a trigger is
executing. (3168)
CAUSE:
In existing applications, the error usually indicates hardware/system problem, r-code corruption, or data corruption.
In applications under development, the error usually indicates that the named procedure <procedure> is attempting to create a record in the named table <table> during the execution of the CREATE trigger of that table.
FIX:
If this problem occurs in an existing application, examine all hardware/system components to ensure that they are all healthy. If that does not resolve the problem, dump and load the data base and/or recompile the application.
If this problem occurs in a new application under development, review the logic of the named procedure to ensure that it does not attempt to CREATE a record in the named table while that table's CREATE trigger is executing.
Following are three possible scenarios where such an error may be caused by such programming logic:
1. The CREATE trigger itself contains a CREATE statement for the same table. To reproduce this, add a "CREATE customer." statement to the SPORTS2000 customer create trigger file sports2000trgs/crcust.p and run the statement "CREATE customer." from the procedure editor. The following error will be generated:
Attempt to CREATE a Customer record in sports2000trgs/crcust.p while a trigger
is executing. (3168)
2. A session level trigger attempts to directly CREATE a record in its own table. To reproduce this, save the following snippet as somefilename.p and execute the statement ·RUN somefilename.p.· from the procedure editor.
/***********************************/
ON CREATE OF customer DO:
CREATE customer.
END.
CREATE customer.
/***********************************/
The following error will be generated:
Attempt to CREATE a Customer record in somefilename.p while a trigger is
executing. (3168)
3. A session level trigger attempts to indirectly CREATE a record in its own table. To reproduce this, save the following snippet as somefilename.p and execute the statement ·RUN somefilename.p.· from the procedure editor.
/***********************************/
ON CREATE OF customer DO:
RUN alpha.
END.
CREATE customer.
PROCEDURE alpha:
CREATE customer.
END.
/***********************************/
The following error will be generated:
Attempt to CREATE a Customer record in somefilename.p while a trigger is
executing. (3168)