Home » Developer & Programmer » Forms » How to write code for delete statement .....?
How to write code for delete statement .....? [message #259662] Thu, 16 August 2007 04:04 Go to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Hi all,
I have a form which will ask for delivery details from customer, after entering all the details my form will generate the order book form number to customer. And this form have
delete and edit button. If customer wants to edit means they can simply click on the edit button and they can edit. Every thing is almost over,My problem is writing code for delete button.

Can anyone tell me how to write code in delete button!

regards,
jame
Re: How to write code for delete statement .....? [message #259673 is a reply to message #259662] Thu, 16 August 2007 04:22 Go to previous messageGo to next message
karthick2809
Messages: 50
Registered: April 2007
Location: Chennai
Member
why do you go for special delete buttons when you have default & console bar.
Re: How to write code for delete statement .....? [message #259675 is a reply to message #259673] Thu, 16 August 2007 04:27 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Hi karthick2809,
How is it possible, please guide me, i have 6 blocks and 3 canvases, Four blocks are database items and 2 others are non database item.

thanks for ur reply....

regards,
jame
Re: How to write code for delete statement .....? [message #259678 is a reply to message #259662] Thu, 16 August 2007 04:29 Go to previous messageGo to next message
karthick2809
Messages: 50
Registered: April 2007
Location: Chennai
Member
attach your fmb.let me check it out
Re: How to write code for delete statement .....? [message #259682 is a reply to message #259662] Thu, 16 August 2007 04:32 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Form Version : 6i
Re: How to write code for delete statement .....? [message #259684 is a reply to message #259682] Thu, 16 August 2007 04:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What exactly do you plan to delete? Master record and its details? If so, the easiest way would be to leave it to the database - create referential integrity constraint using the ON DELETE CASCADE option.

If, on the other hand, you need to delete only specific records, you'll have to go to that block and, well, delete records, one by one.
GO_BLOCK('block_name');
DELETE_RECORD;
Re: How to write code for delete statement .....? [message #259688 is a reply to message #259684] Thu, 16 August 2007 04:44 Go to previous messageGo to next message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Hi Littlefoot,
I tried ur way,but it is getting clear only in block not in database, i want to completely remove it from database.

>>go_block('order_book');
>>delete_record;

Thanks for ur reply, please check my .fmb file

regards,
jame

[Updated on: Thu, 16 August 2007 04:45]

Report message to a moderator

Re: How to write code for delete statement .....? [message #259701 is a reply to message #259688] Thu, 16 August 2007 05:02 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, I thought you knew that COMMIT saves changes you've made.
Re: How to write code for delete statement .....? [message #259708 is a reply to message #259701] Thu, 16 August 2007 05:18 Go to previous message
james_aron
Messages: 32
Registered: July 2007
Location: chennai
Member
Hi,
Thanks man, its working fine now.I am new to this thats y suffering for small things...thanks once again.

regards,
jame
Previous Topic: text item at run
Next Topic: Java applet runs within Oracle form
Goto Forum:
  


Current Time: Sat Dec 10 09:18:04 CST 2016

Total time taken to generate the page: 0.09473 seconds