Home » Developer & Programmer » Forms » how to delete record
how to delete record [message #416043] Thu, 30 July 2009 04:49 Go to next message
Messages: 38
Registered: July 2009
guy's i want that when i press a push button then my record should get delete from the database
for this i m writting
built-in but this is deleting the particular record only from the form but not from the database and if i m writting
then instead of deletion insertion is happening in my form actually what's happening is the particular record on which my cursor is deleting but all other records are getting commiting any solution for the problem . Sad
Re: how to delete record [message #416049 is a reply to message #416043] Thu, 30 July 2009 04:59 Go to previous messageGo to next message
Messages: 22
Registered: May 2008
Junior Member
Hi ,
instead of using delete_record
use a database function and call it in your form.

in the declaration of your function.
use "commit;" in the function.
Re: how to delete record [message #416072 is a reply to message #416043] Thu, 30 July 2009 06:15 Go to previous messageGo to next message
Messages: 12802
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do not do that. That is not a sensible use of autonomous transactions at all.

What you've described is the way forms is supposed to work.
Delete_record issues a delete command for the current record.
No delete or insert or update from forms is made permanent untill you commit.
Commit commits all changes in your form since the last commit.

Just use delete_record and let the user commit the changes themselves with the save button.
Re: how to delete record [message #416092 is a reply to message #416072] Thu, 30 July 2009 07:40 Go to previous message
Messages: 21130
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Or, don't reinvent the wheel. If you use default Forms toolbar, it already contains the "delete record" button (a little red cross icon). Teach your users to use it.
Previous Topic: compilation error
Next Topic: report_object_status [ERROR]
Goto Forum:

Current Time: Wed Jul 26 03:54:19 CDT 2017

Total time taken to generate the page: 0.12766 seconds