which event use for checking befor delete

To discuss Oracle Forms & Reports related technical issues.
Post Reply
mfa786
Posts: 51
Joined: Thu Jun 01, 2006 4:37 am
Location: Pakistan

which event use for checking befor delete

Post by mfa786 »

Sir my requirement is the system asking befor deleting record
You see my code
If found this chq in ledger file then not delete form cheqfile
Sir my question is where I put I this code
Or which event I use

select count(*) into :CHQFOUND from voumaster where cheqno=:rchqno;
if :CHQFOUND>0 then
message('Can not be del this chq is use');
message('Can not be del this chq is use');
go_item(?Chqno?);
else
message('delete your cheq');
message('delete your cheq');
commit_form;
end if;



pleas give me idea

thanks

aamir
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

Use KEY-DELREC Trigeer on BLOCK Level

You can Place ur Query in this Trigger and check the record exist or Not

Best Regards.

Muhammad Kashif
mirza_rehan
Posts: 132
Joined: Sun Apr 02, 2006 10:36 am
Location: Pakistan

Post by mirza_rehan »

Write thers code in <b>PRE-DELETE</b> trigger at block lavel

select count(*) into :CHQFOUND from voumaster where cheqno=:rchqno;
if :CHQFOUND>0 then
message('Can not be del this chq is use');
message('Can not be del this chq is use');
Raise Form_Trigger_Failure;
else
Message('delete your cheq');
message('delete your cheq');
end if;



Best regards,
R E H A N M I R Z A
System Analyst / Senior Oracle Developer
Cell: +92-304-2120807

When ever you pray
Please remember me and my family
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest