Re: deleting records prior to entering a form

From: george <wgweis_at_ucdavis.edu>
Date: 1997/06/04
Message-ID: <5n4kkr$583$1_at_mark.ucdavis.edu>#1/1


wgweis_at_ucdavis.edu (george) wrote:

Since posting this yesterday, I have received two responses. The answer to my question was to use FORMS_DDL('COMMIT') in place of COMMIT_FORM. My thanks to Martyn and Steve for e-mailing me.

George

>Hi:
 

>I have this problem I hope someone out there can help me with. I am
>using a temporary table to store text lines for a student transcript.
>Each record in the table is one line of text. Before entering the
>form displaying the transcript, however, I'd like to clean up this
>table by deleting any records which were not created on the actual day
>the form is being run. I wrote the following code in a trigger called
>by WHEN-NEW-FORM-INSTANCE:
 

>/*
> * New trigger: delete old transcript_temp records.
> */
>DECLARE
> TODAY DATE;
>BEGIN
> SELECT SYSDATE INTO TODAY FROM DUAL;
 
> DELETE FROM TEMP_TABLE WHERE TEMP_TABLE_ACTIVITY_DATE <
>TRUNC(TODAY);
 
>-- suppress commit message.
> :SYSTEM.MESSAGE_LEVEL := 15;

 COMMIT_FORM;
> :SYSTEM.MESSAGE_LEVEL := 0;
>END;
 
>The problem is, the records don't get deleted. It is as if I need to
>commit somewhere and the form is not committing. I tried 'COMMIT'
>instead of 'COMMIT_FORM' with no results. MS Access has something
>called a delete query. How can I do the same thing in Oracle?
 

>George
Received on Wed Jun 04 1997 - 00:00:00 CEST

Original text of this message