Home » Developer & Programmer » Forms » Tab Canvas - Record Deletion (Oracle IDS 10g,Windows XP)
Tab Canvas - Record Deletion [message #384250] Tue, 03 February 2009 00:35 Go to next message
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
delete_record;

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 #384272 is a reply to message #384250] Tue, 03 February 2009 01:38 Go to previous messageGo to next message
tipyyt
Messages: 11
Registered: March 2007
Location: Karachi
Junior Member

send the form.
Re: Tab Canvas - Record Deletion [message #384299 is a reply to message #384250] Tue, 03 February 2009 03:15 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You either didn't commit or - if you did and not error message appeared - you have done that in a different schema.
Re: Tab Canvas - Record Deletion [message #384313 is a reply to message #384299] Tue, 03 February 2009 04:13 Go to previous messageGo to next message
varosh81
Messages: 178
Registered: February 2008
Location: CHENNAI
Senior Member
Hi Sir !
Thanks for your reply !
I didnt commit..
what can be done to resolve this issue?
Regards,
varosh
Re: Tab Canvas - Record Deletion [message #384317 is a reply to message #384250] Tue, 03 February 2009 04:45 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
commit?
Re: Tab Canvas - Record Deletion [message #384319 is a reply to message #384317] Tue, 03 February 2009 04:49 Go to previous messageGo to next message
varosh81
Messages: 178
Registered: February 2008
Location: CHENNAI
Senior Member
I mean, didnt use
commit;

for saving purpose after the delete statement in my coding ..

Regards,
varosh
Re: Tab Canvas - Record Deletion [message #384322 is a reply to message #384250] Tue, 03 February 2009 05:02 Go to previous messageGo to next message
cookiemonster
Messages: 12403
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 #384379 is a reply to message #384250] Tue, 03 February 2009 09:28 Go to previous messageGo to next message
psix666
Messages: 51
Registered: April 2007
Location: Azerbaijan
Member

Hi there.

After deletion of record try to do:
forms_ddl('commit');


and then
go_block('block_name');
execute_query;


U need to refresh that block.

Murad.
Re: Tab Canvas - Record Deletion [message #384383 is a reply to message #384250] Tue, 03 February 2009 09:45 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why would you need to do execute_query after delete_record?
Re: Tab Canvas - Record Deletion [message #384409 is a reply to message #384250] Tue, 03 February 2009 13:18 Go to previous messageGo to next message
psix666
Messages: 51
Registered: April 2007
Location: Azerbaijan
Member

Hi,

varosh81 wrote on Tue, 03 February 2009 10:35

and also tried with
delete from employee where employeeid=2 ;




Because of this. Sorry if i'm wrong.

Murad.
Re: Tab Canvas - Record Deletion [message #384467 is a reply to message #384409] Tue, 03 February 2009 23:55 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What is wrong with the default 'delete' button in the top toolbar?

Does the record 'disappear' from the block when it is pushed?

forms_ddl('commit');
is crap!! ANYTHING in a 'forms_ddl' forces a 'commit'. If you MUST use your own 'delete' code then use 'standard.commit'.

David
Re: Tab Canvas - Record Deletion [message #384518 is a reply to message #384322] Wed, 04 February 2009 03:15 Go to previous messageGo to next message
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 Go to previous messageGo to next message
cookiemonster
Messages: 12403
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
cookiemonster
Messages: 12403
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 Go to previous messageGo to next message
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 #384786 is a reply to message #384250] Thu, 05 February 2009 03:27 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
So does that mean the problem is solved?
Re: Tab Canvas - Record Deletion [message #384791 is a reply to message #384786] Thu, 05 February 2009 03:55 Go to previous messageGo to next message
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

Re: Tab Canvas - Record Deletion [message #384821 is a reply to message #384250] Thu, 05 February 2009 05:59 Go to previous message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have you issued a commit after deleting the record?
Previous Topic: set maximum length
Next Topic: Forms 3.0 Forms 4.5 Key Mapping
Goto Forum:
  


Current Time: Fri Dec 02 12:04:14 CST 2016

Total time taken to generate the page: 0.06340 seconds