Home » Developer & Programmer » Forms » when i press the save button in a master detail form
when i press the save button in a master detail form [message #169372] Wed, 26 April 2006 08:39 Go to next message
haitham
Messages: 60
Registered: February 2006
Member

i made a master detail data block
at the master block i have to insert a new record and at the detail block i have to update the existing detailed records,
when i press the save button only the master record is inserted and the detailed records are not updated..so why this happens
and what i have to do...
thanks for help
Re: when i press the save button in a master detail form [message #169426 is a reply to message #169372] Wed, 26 April 2006 15:11 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What kind of a master-detail relationship is it when master record isn't entered yet ("I have to INSERT A NEW record") while, at the same time, its detail records already exist ("I have to UPDATE THE EXISTING DETAILed records")?

I'd expect it to be vice versa: you'd update existing master record and insert new detail records.

By default, COMMIT saves all data in all blocks. How do you update records? Using the UPDATE statement or typing on the keyboard? Perhaps your UPDATE failed (not necessarily throwing an error, but something like "0 records updated") because I can't imagine why would data you overtyped not be saved ...

But let's see what others have to say about the problem.
Re: when i press the save button in a master detail form [message #169449 is a reply to message #169372] Wed, 26 April 2006 21:38 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please describe your form - number of blocks, relationship between them. Perhaps you could type your specification so that we can read it.

David
Re: when i press the save button in a master detail form [message #169698 is a reply to message #169426] Fri, 28 April 2006 04:56 Go to previous messageGo to next message
haitham
Messages: 60
Registered: February 2006
Member
im sorry ... i didnt describe the topic well...
i have a parent table (purchase request) and two child tables (item purchase request) and (order purchase request).
i made two master detail forms , the first one contains the purchase request as the master data block and the item purchase request as the detail data block such that i insert anew record in the master block and insert coressponding new records(the requested quantaties) in the detail block ,

the second form contains the order purchase request as the master data block and the item purchase request as the detail data block such that i insert a new record in the master block (one of the field of the new record is a fk to the purchase request table)then the coressponding detail records are displayed and i have to update them by adding the quantites recevied ....
thats all ,so when i press the save button i want to insert the new record in the master block and update the records in the detail block ..................

i wish it became clear

[Updated on: Fri, 28 April 2006 06:26]

Report message to a moderator

Re: when i press the save button in a master detail form [message #169944 is a reply to message #169698] Sun, 30 April 2006 23:04 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay ... you are asking for the standard master detail relationship form. Please search this forum for 'master detail'. There are quite a few threads that contain the answer for which you are looking. Also have a look at the Oracle Forms website. They have a master-detail in the 'demos'.

David
Previous Topic: autogenerate
Next Topic: i want to make form of foriegn currecy rate (some body hellp)
Goto Forum:
  


Current Time: Fri Sep 20 08:21:04 CDT 2024