Re: Trigger error ORA-02291
Date: Sun, 10 Dec 2000 06:56:53 GMT
Message-ID: <90v9fk$qff$1_at_nnrp1.deja.com>
In article <90up5n$fga$1_at_nnrp1.deja.com>,
bs7259_at_my-deja.com wrote:
> I have created a WHEN_BUTTON_PRESSED trigger to insert records. When
I
> run the form, I get the ORA-02291 error. But when I immediately hit
the
> save button on the Form builder menu, it saves the record without any
> errors. I have check my code on the trigger but cannot find any
syntax
> errors.
> Any ideas how to isolate the problem.
> thanks
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Try to debug the trigger ( there is a debugger in Forms ). Look up what the exact message is. The ' (string.string)' contains the name of the specific constraint violated and should point you in the direction of the block/field that is a problem.
ORA-02291 integrity constraint (string.string) violated - parent key
not found
Cause: A foreign key value has no matching primary key value.
Action: Delete the foreign key or add a matching primary key.
The error suggests that you are missing a parent key. You could be for instances commiting two rows, the parent and the detail rows. If you try to commit the detail row before the parent is generated, this would create a problem.
-- Michael Krolewski Rosetta Inpharmatics mkrolewski_at_rosetta.org Ususual disclaimers Sent via Deja.com http://www.deja.com/ Before you buy.Received on Sun Dec 10 2000 - 07:56:53 CET