I am a 'light' user of VFP Ver 3.0b (I have 6.0, have not used it yet. I am doing volunteer work with VFP 3.0).
Is there a general 'approach' to storing 'child' records in a one-to-many relationship, specifically, with regard to the 'many' key of the child? (The child key is the Primary key of the parent.) That is, when STORING a child row, can the "many" key be 'duplicated' from the Primary key (assuming that one is 'current' upon the parent row, as in a one-to-many-form)without, say, having to re-type the key value for the child row? I am visualizing a form, for example, with the parent data in the upper portion and either a grid or text fields for multiple or single child rows in the lower part of the form.
I have wondered if this is done best through use of a VIEW, with TRIGGERS or with EVENT CODE in the form? All the VFP books I have read seem not to address this.(You may have surmised from my question - I am from the mainframe hierarchical/network dbms world). I figure that this is probably 'old hat' and that VFP developers have a 'general way' of doing it. Just a hint or a push in the right direction would be greatly appreciated ( I am a newcomer to this forum, and enjoy the information I see here tremendously!).
Thank you, -Jackmcc (Jack McCarrick)
Is there a general 'approach' to storing 'child' records in a one-to-many relationship, specifically, with regard to the 'many' key of the child? (The child key is the Primary key of the parent.) That is, when STORING a child row, can the "many" key be 'duplicated' from the Primary key (assuming that one is 'current' upon the parent row, as in a one-to-many-form)without, say, having to re-type the key value for the child row? I am visualizing a form, for example, with the parent data in the upper portion and either a grid or text fields for multiple or single child rows in the lower part of the form.
I have wondered if this is done best through use of a VIEW, with TRIGGERS or with EVENT CODE in the form? All the VFP books I have read seem not to address this.(You may have surmised from my question - I am from the mainframe hierarchical/network dbms world). I figure that this is probably 'old hat' and that VFP developers have a 'general way' of doing it. Just a hint or a push in the right direction would be greatly appreciated ( I am a newcomer to this forum, and enjoy the information I see here tremendously!).
Thank you, -Jackmcc (Jack McCarrick)