Home » Developer & Programmer » Forms » database operations in forms (forms 6i)
database operations in forms [message #276102] Wed, 24 October 2007 00:01 Go to next message
gayathricg
Messages: 3
Registered: October 2007
Junior Member
hi

i am very new to forms. I need to perform the database operations(insert delete update) on a form with master block and detail block.

I couldn perform the delete operation on child record alone.
i.e. if the cursor is in child record and i press delete button, only that record should be deleted.

i tried
delete_record;
standard.commit;

but its not working.

Also is there any option to execute sql query when i click a button?

please help me out.Thanks in advance.
Re: database operations in forms [message #276119 is a reply to message #276102] Wed, 24 October 2007 01:14 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Do not code that (deleting, inserting and updating) - a master-detail form written by Data Block Wizard will do all of it by default. There's really NO NEED to write your own code; use buttons from the form taskbar.
Re: database operations in forms [message #276122 is a reply to message #276102] Wed, 24 October 2007 01:19 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Just use the wizards to create your two blocks and teh 'relations' that joins them. Search this forum for 'master 'detail'. Go to the Oracle Forms website and download a sample 'master-detail' form if you want more ideas.

David
Re: database operations in forms [message #276146 is a reply to message #276122] Wed, 24 October 2007 02:10 Go to previous messageGo to next message
gayathricg
Messages: 3
Registered: October 2007
Junior Member
hi
thanks for the reply
i created the form using wizard only.
and the task bar buttons do the functions.
but wat should i code if i want to delete the current record on clicking a button.

please help me out

thanks in advance

Re: database operations in forms [message #276155 is a reply to message #276146] Wed, 24 October 2007 02:59 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Nothing. Do not write your own code until much later. Just select the record and then press the delete button.

David
Re: database operations in forms [message #278168 is a reply to message #276146] Fri, 02 November 2007 03:56 Go to previous message
sasipalarivattom
Messages: 121
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member
Try this one
do_key('delete_record');
Reagrds
Sasi..
Previous Topic: LOV for the dba_users
Next Topic: access violation error
Goto Forum:
  


Current Time: Mon Mar 10 14:25:31 CDT 2025