Home » Developer & Programmer » Forms » Delete Record to Table
Delete Record to Table [message #510426] Sun, 05 June 2011 19:42 Go to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Hi gents!
Missed me?hehe
Anyways, question again.
How can I delete a record simultaneously to table?
Thanks in advance!

Regards,
Faith
Re: Delete Record to Table [message #510432 is a reply to message #510426] Mon, 06 June 2011 00:12 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid I don't understand the question. What does it mean? ("Simultaneously"? Simultaneously with what?)
Re: Delete Record to Table [message #510434 is a reply to message #510432] Mon, 06 June 2011 00:20 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

My problem is connected to my previous issue.
Simultaneously, that when I delete the record to Form using delete_record,
the data in my table will also be deleted.
Hope you get the point. 'Coz i'm really having a hard time explaining it technically..Sad

Re: Delete Record to Table [message #510435 is a reply to message #510434] Mon, 06 June 2011 00:26 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You need to COMMIT after DELETE_RECORD.
Re: Delete Record to Table [message #510437 is a reply to message #510435] Mon, 06 June 2011 00:39 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

it's not working ;(
Re: Delete Record to Table [message #510438 is a reply to message #510437] Mon, 06 June 2011 00:50 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It should. You must be doing something wrong.
Re: Delete Record to Table [message #510439 is a reply to message #510438] Mon, 06 June 2011 00:54 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Is it just a simple

BEGIN
delete_record;
commit;
END;

????
Am I wrong?
Re: Delete Record to Table [message #510440 is a reply to message #510439] Mon, 06 June 2011 00:59 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Maybe; Cookiemonster, in your previous thread, suggested use of COMMIT_FORM. Did you try it?
Re: Delete Record to Table [message #510441 is a reply to message #510440] Mon, 06 June 2011 01:01 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Yeah I also tried..

BEGIN
delete_record;
commit_form;
END;

same thing.
it's not working. Sad
Re: Delete Record to Table [message #510442 is a reply to message #510441] Mon, 06 June 2011 01:04 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Can you describe what you are doing?

Where is that "delete" button? What block does it belong to? (Because, it deletes a record in a block that contains the button). Is it a database block? What table is it based on? How do you check whether record got deleted or not?
Re: Delete Record to Table [message #510444 is a reply to message #510442] Mon, 06 June 2011 01:14 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Delete Button is in its datablock.
At first, I made a block manually. Then after a while,
I go to its property then I just put the 'table name'
on the 'Query Data Source Name'.
I'm doing the usual process. Putting some needed information
then, press SAVE Button. I'm checking it if its inserting, and yes, it does.
Then after saving, I press the DELETE Button and I checked my table, the data is still there.
Re: Delete Record to Table [message #510445 is a reply to message #510444] Mon, 06 June 2011 01:23 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you don't use your own "Delete" button, but the one that is part of Forms' toolbar (it is a red "X" icon)?

- go to a record you would like to delete
- press red "X" button
- press "Save" button on the toolbar
- check the table - what do you see?
Re: Delete Record to Table [message #510448 is a reply to message #510445] Mon, 06 June 2011 01:57 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

I don't see any record thing here. Only on the left side of the Form which indicates that you want to delete a block, canvas or the module.
Below is my interface. You can a small window, the delete button is my problem. They are in same block.
/forum/fa/9062/0/

I posted earlier the code of the delete button.
  • Attachment: wHcLTjhA.jpg
    (Size: 72.51KB, Downloaded 1110 times)
Re: Delete Record to Table [message #510452 is a reply to message #510448] Mon, 06 June 2011 02:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I was talking about these buttons:

/forum/fa/9063/0/



On your screenshot, there are two "Delete" buttons. One is on a "large" (Buy-Off Transactions window) and another one on "small" (REWORK) window.

Which one did you push?

I suppose that, if you are in "Buy-Off Details" block, positioned in the second record (Line No = 2, "Die Elec...") and push "Delete" (this one: SAVE DELETE Cancel), that very record is removed from block. Also, if there's COMMIT (COMMIT_FORM) in WHEN-BUTTON-PRESSED trigger, it is deleted from a table (otherwise, you should manually save changes you've made).

Your screenshot: if you are now in REWORK window and push that DELETE button, nothing would happen because - there are no records in that block (Code - Description - Qty items are empty).
  • Attachment: toolbar.png
    (Size: 7.52KB, Downloaded 1079 times)
Re: Delete Record to Table [message #510453 is a reply to message #510452] Mon, 06 June 2011 02:19 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

In the image you posted. I don't see any of that in my Form.
In the REWORK Window, I deleted the record before I do the print screen.
But if put some data in the REWORK Window, and I press the delete button,
it only deletes the record in the window but not in the table. Sad
Re: Delete Record to Table [message #510455 is a reply to message #510453] Mon, 06 June 2011 02:31 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's strange.

When posting DELETE button's code, which DELETE button was it? "DELETE - SAVE - BACK" or "SAVE - DELETE - Cancel"?

Does the other (SAVE - DELETE - Cancel) button work correctly? How does it look like?
Re: Delete Record to Table [message #510459 is a reply to message #510455] Mon, 06 June 2011 02:37 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

You mentioned earlier and the posts that when making a datablock, just follow the Wizard.
What I do is I don't follow the Wizard, I made my datablock manually which has the same name as my table.
Is that can also be the reason?
Actually, i'm making a new form from the start following your instructions. Smile
Hope this will work this time.
Re: Delete Record to Table [message #510461 is a reply to message #510459] Mon, 06 June 2011 02:41 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, if you are doing that manually, you should know HOW TO DO THAT. If you are not experienced Forms user, maybe you missed one or more settings which caused unexpected behavior.
Re: Delete Record to Table [message #510463 is a reply to message #510461] Mon, 06 June 2011 02:49 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Hmmm...I'll get back to you for the update. Please don't give up helping me.. Smile
THANKS!
Re: Delete Record to Table [message #510631 is a reply to message #510463] Mon, 06 June 2011 21:14 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Good Morning! Smile
Can I ask a favor?
Can I have some link of tutorial about Forms?
Please?
Thank You!
Re: Delete Record to Table [message #510641 is a reply to message #510631] Tue, 07 June 2011 00:03 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have any, so ... Google is your friend. Take a look at this tutorial; might be OK for beginning.
Re: Delete Record to Table [message #510646 is a reply to message #510641] Tue, 07 June 2011 01:27 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

Thanks! This will be helpful for me..Smile
Re: Delete Record to Table [message #510651 is a reply to message #510646] Tue, 07 June 2011 02:09 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Also worth noting that oracle form builder help is incredibly comprehensive - It gives for listing for every builtin with examples, as well as having topics on every concept of how forms work. Make use of it.
Re: Delete Record to Table [message #510652 is a reply to message #510651] Tue, 07 June 2011 02:12 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

ok! Namaste!
Re: Delete Record to Table [message #510663 is a reply to message #510652] Tue, 07 June 2011 03:32 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
you must be doing something on on-commit trigger.

don't use this trigger ever.
Re: Delete Record to Table [message #510665 is a reply to message #510663] Tue, 07 June 2011 03:34 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Must? Really?

There's all sorts of ways this could be broken.
Re: Delete Record to Table [message #510672 is a reply to message #510663] Tue, 07 June 2011 03:49 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

athar.fitfd@hotmail.com wrote on Tue, 07 June 2011 00:32
you must be doing something on on-commit trigger.

don't use this trigger ever.


Actually I don't use any of the trigger.
As long as I can do all the transaction in query, I'll do so.
Thanks for the info then, I will not use on-commit Smile
Re: Delete Record to Table [message #510673 is a reply to message #510672] Tue, 07 June 2011 03:53 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
faithima wrote on Tue, 07 June 2011 09:49

As long as I can do all the transaction in query, I'll do so.


What does that mean?
Re: Delete Record to Table [message #510680 is a reply to message #510673] Tue, 07 June 2011 04:31 Go to previous messageGo to next message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

What I meant here is, I put all the necessary query in a button.
Re: Delete Record to Table [message #510683 is a reply to message #510680] Tue, 07 June 2011 04:42 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
delete_record is not, in any meaningful sense, a query. It's a command, or a builtin. If you refer to such things as queries you're going to confuse people.
Re: Delete Record to Table [message #510684 is a reply to message #510683] Tue, 07 June 2011 04:44 Go to previous message
faithima
Messages: 37
Registered: April 2011
Location: Philippines
Member

ahhh..I see..Smile
Previous Topic: FRM-91120 Internal ERror: Unable to load NLS character set
Next Topic: LOV
Goto Forum:
  


Current Time: Thu Sep 12 08:57:13 CDT 2024