Tab Canvas - Record Deletion [message #384250] |
Tue, 03 February 2009 00:35  |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi !
I have created a form based on Tab Canvas..
In one of my tabs i wish to delete a record that is displayed ..
Iam using a push button with the coding
and also tried with
delete from employee where employeeid=2 ;
That particular record is not deleted (when i use either of the above coding)..
Pls help to over come this issue ..
Thanks and Regards,
varosh
[Updated on: Tue, 03 February 2009 00:44] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Tab Canvas - Record Deletion [message #384322 is a reply to message #384250] |
Tue, 03 February 2009 05:02   |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
We seem to be getting confused here, so lets clarify a few points.
1) Is delete_record the only command in your button? and if it isn't can you supply the full code for the button.
2) When you press the button does the record disapear from the canvas?
3) Do you get any messages - either to say the record was deleted or to indicate an error?
Answer those and we'll move on from there.
|
|
|
|
|
|
|
Re: Tab Canvas - Record Deletion [message #384518 is a reply to message #384322] |
Wed, 04 February 2009 03:15   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi Cookie sir !
Thanks for your reply
I have used
delete from emp where id =:emp.id;
in the button and no other coding..
And when i click it, the datas are not disappearing..
I got the message
frm-40657:Record changed or deleted by another user
Thanks and Regards,
varosh
|
|
|
Re: Tab Canvas - Record Deletion [message #384526 is a reply to message #384250] |
Wed, 04 February 2009 03:55   |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That'd be because you're not deleting the record from the data block, you're bypassing the datablock entirely and deleting from the table.
If you do it that way you will have to requery the block afterwards.
What happens when you just put delete_record in your button?
|
|
|
Re: Tab Canvas - Record Deletion [message #384545 is a reply to message #384526] |
Wed, 04 February 2009 04:35   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi !
I tried with
delete_record;
when i click the button once, no change happens.
When i double click the button, the datas are getting disappeared in the form, but that record is not deleted from the table..
Thanks and Regards,
varosh
|
|
|
Re: Tab Canvas - Record Deletion [message #384582 is a reply to message #384250] |
Wed, 04 February 2009 06:03   |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Double click shouldn't be necessary. I suspect it thinks it's in a different block to the button.
Try putting
go_item(:system.trigger_item);
immediately before the delete_record command.
As for this:
Quote: |
the datas are getting disappeared in the form, but that record is not deleted from the table..
|
Are you commiting the change?
EDIT: changed the system variable to a better one
[Updated on: Wed, 04 February 2009 06:07] Report message to a moderator
|
|
|
Re: Tab Canvas - Record Deletion [message #384716 is a reply to message #384582] |
Wed, 04 February 2009 23:22   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi Sir!
Thanks for your reply!
I tried with the coding u suggested,
go_item(:system.trigger_item);
delete_record;
Still the record is not getting deleted its getting disappeared only.. I didnt commit the datas ..!
Thanks and Regards,
varosh
|
|
|
|
Re: Tab Canvas - Record Deletion [message #384791 is a reply to message #384786] |
Thu, 05 February 2009 03:55   |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi!
The problem didnt get solved..
The deletion of record is not happening, just they are getting disappeared when i click the delete button.. Thats it !
Pls help me with a solution!
Thanks and Regards,
varosh
|
|
|
|