Very Urgent [message #81091] |
Mon, 06 January 2003 04:24 |
Aydah
Messages: 11 Registered: November 2002
|
Junior Member |
|
|
I have this insert code, after inserting the record it goes to a new record and i want it to stop at the same record which is inserted , please help me!!!
declare
alert number;/*assign a variable to the alert*/
begin
set_alert_property('Show_alert', title, 'Insert Record');/*headings of the alert box*/
set_alert_property('show_alert',alert_message_text,'are you sure you want to insert new record?');/*message of the alert box*/
set_alert_button_property('show_alert',Alert_button1,label, 'Cancel');/*first button is labeled Cancel*/
set_alert_button_property('show_alert',Alert_button2,label, 'OK');/*second button is labeled OK*/
/*if :system.last_record='false' then*/
last_record;
next_record;
alert:=show_alert('show_alert');/*the show_alert will pop up*/
if alert=alert_button2 then/*if user press OK then insert the record*/
FORMS_DDL('INSERT INTO TBL_TRAINERS VALUES(:TBL_TRAINERS.TRAI_TRAINER_NO, :TBL_TRAINERS.TRAI_TRAINER_NAME, :TBL_TRAINERS.TRAI_TRAINER_DOB, :TBL_TRAINERS.TRAI_TRAINER_GENDER, :TBL_TRAINERS.TRAI_JOIN_DATE, :TBL_TRAINERS.TRAI_SALARY, :TBL_TRAINERS.TRAI_TRAINER_HOME_PHONE, :TBL_TRAINERS.TRAI_TRAINER_MOBILE_PHONE, :TBL_TRAINERS.TRAI_TRAINER_FAX');
COMMIT;
else
null;
end if;
end;
|
|
|
|