Re: Forms 4.5 How- to Help requested

From: Andy <as.no.spam.stedat_at_gmx.net>
Date: Tue, 11 Dec 2001 14:33:26 GMT
Message-ID: <3c1618d8.364260819_at_by-news.bayer-ag.com>


On 11 Dec 2001 01:30:08 -0800, guycorbett_at_my-deja.com (Guy) wrote:

>OPEN base_table_cursor;
>> FETCH base_table_cursor INTO v_dummy;
>> IF base_table_cursor%FOUND THEN
>> --
>> -- Record already exists
>> --
>> CLOSE base_table_cursor;
>
>
>Thanks for the response but I think I did not make myself clear. I
>already have a piece of code similar to the above but the insert is
>initiated by a commit_form so what I can't work out is how to handle
>the condition where the record already exists. For a new record, when
>the user presses the 'Save' icon the commit_form will insert the new
>record, commit the changes and leave the user in the form with old and
>new records displayed. They want the same behaviour for 'insertion'
>of the records which already exist but are excluded by the where
>clause. In my handling of the record-already-exists condition above I
>can sort out the other table so that it is now included in the where
>clause but then what? If I allow the insert to continue it will fail
>because of the duplicate. If I try to rollback or requery the block I
>get an error saying this is not allowed in the pre-insert trigger.
>If this is not possible I can redesign the flow of the form but this
>is not really what the user wants.

Hi Guy,

i think you have to change the block to a non-database block and doing all query and insert/update through triggers. This will prevent the block (the rows) from being processed by form_commit processing and you do all the necessary processing when you want.

hth
Andy Received on Tue Dec 11 2001 - 15:33:26 CET

Original text of this message