Home » Developer & Programmer » Forms » How to Update Master Records ? (merged)
How to Update Master Records ? (merged) [message #154530] Mon, 09 January 2006 05:25 Go to next message
sunidhi
Messages: 36
Registered: January 2006
Location: New Delhi
Member
Hi all,

Hope u find in best of health and surroundings.

I need help .

How can we Update Master record and simultaneously it

reflects to Detail records ??

Do Needful.

Regards.



Re: How to Update Master Records ? (merged) [message #154635 is a reply to message #154530] Mon, 09 January 2006 21:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
1) Please don't put CR/LF at the end on each line. They will wrap automatically.
2) Please post your table structures for these tables.
3) Please reconsider your design. I STRONGLY recommend that you do not try to update Foreign Key fields in Oracle Forms.
4) If you have to have foreign key fields that you can update then you need to create a new Master record, change the existing detail records to use the new Master data values, delete the old Master record, and then requery the Master block. The relationship between the Master and Detail blocks will bring back the Detail records.

David
Re: How to Update Master Records ? (merged) [message #155332 is a reply to message #154635] Fri, 13 January 2006 23:03 Go to previous messageGo to next message
sunidhi
Messages: 36
Registered: January 2006
Location: New Delhi
Member
Thanks Mr. DJ Martin,

If I have to have foreign key fields that you can update then you need to create a new Master record, change the existing detail records to use the new Master data values, delete the old Master record, and then requery the Master block. The relationship between the Master and Detail blocks will bring back the Detail records.

can u give me code for this.

I will be ver grateful to u.

Regards,

Sunidhi
Re: How to Update Master Records ? (merged) [message #155383 is a reply to message #155332] Sun, 15 January 2006 16:32 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I don't have Forms on this PC so I can't write AND TEST the code. But try this, make the Key Mode of your tables 'Updateable'. See if that lets you update your primary keys successfully.

@others: Would you use Key Mode = Updateable or write DML logic in an On-Update trigger?

David
Previous Topic: oracle form to web application
Next Topic: Use OLE2 packege in Forms&Reports 6.0.
Goto Forum:
  


Current Time: Fri Sep 20 05:34:41 CDT 2024