Home » Developer & Programmer » Forms » how the rows delete from multiple table on button press (oracle-8i, form-6i)
how the rows delete from multiple table on button press [message #316156] Thu, 24 April 2008 00:29 Go to next message
gajendra
Messages: 8
Registered: April 2008
Location: INDORE
Junior Member

Hi to all,

i have a form it is cheque form we need if we paid multiple bills against the single cheque then these bills must be deleted from the other table like entry table,vendor table etc.

how it is possible. give me any suggestion.

i am waiting for reply.
Re: how the rows delete from multiple table on button press [message #316159 is a reply to message #316156] Thu, 24 April 2008 00:35 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
WHEN-BUTTON-PRESSED trigger, in its simplest form:
DELETE FROM first_table  WHERE id = :block.id;
DELETE FROM second_table WHERE id = :block.id;
DELETE FROM third_table  WHERE id = :block.id;
DELETE FROM etc_table    WHERE id = :block.id;

COMMIT;
Of course, you'll have to pay attention to possible foreign key constraints and first delete details, while master is to be deleted last.
Re: how the rows delete from multiple table on button press [message #316925 is a reply to message #316159] Mon, 28 April 2008 20:29 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
If you run this code in the form you need to use 'standard.commit'.

David
Previous Topic: Downgrade forms from version 10.1.2 to 9.0.4
Next Topic: CALLING REPORT FROM FORM USING 9iDS
Goto Forum:
  


Current Time: Tue Dec 06 02:22:01 CST 2016

Total time taken to generate the page: 0.11736 seconds