Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!hp4nl!eurtrx!papegaai From: papegaai@eurtrx.UUCP (SKBS) Newsgroups: comp.databases Subject: Re: Question about Oracle SQL*Forms Keywords: oracle forms master detail Message-ID: <396@eurtrx.UUCP> Date: 13 Jun 89 13:09:17 GMT References: Distribution: comp Lines: 39 lawhorn@optis31.uucp (Jeff Lawhorn) writes: >We have recently started using SQL*Forms. Now I have a question >I hope someone out there can answer. >I have 2 tables that I need to establish a master/detail >relationship between. Much like the relationship between the >orders table and the lineitems table in the Forms Tutorial. The >big difference, and one I have not been able to overcome as of >yet, is that I need to have the detail records displayed each and >every time the master record is displayed. I do not (can not) >want the user to have to switch blocks to call up the detail >records. >So, does anyone out there know of (or have any suggestions) a way >to do this??? >Thanks in Advance for any help anyone can send my way. >-- The solution I have been using is to provide all keys that cause changes in the master record (up/down, PgUp, PgDn etc.) with their own macros. All these macros do is to jump to the slave block, execute a query and return to the master block. The code looks like this: #EXEMACRO GOBLK [slave-block]; EXEQRY; GOBLK [master-block]; Provided you copy the value of the master block key-field to the slave-block foreign-key field, you will get the desired result. Bard C. Papegaaij BSO/Artificial Intelligence bv Stichting KBS "it can hardly be a coincidence that no language on Earth has ever produced the expression "as pretty as an airport"" Douglas Adams, The Long Dark Tea-Time of the Soul