Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Behavior - New Child on New Parent
Message
From
09/07/2003 14:21:43
Robert Jewett
Q Technology Consulting
Tyler, Texas, United States
 
 
To
09/07/2003 11:40:43
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00808305
Message ID:
00808616
Views:
10
Jason:

This appears to be on the right track! I traced the code from the new, and sure enough a record IS added to the child table. However, the parent ID is never propogated to the child, and the requery sure enough does a table revert, eliminating the new record. Since this is obviously not the way things are intended to work (at least from my read on the docs), I am wondering if I missed a step somewhere, or this is a known bug? The alternatives I see now are as follows:

1. Modify the framework to trap for the IsNew() condition you describe

2. Trap for the condition and insert the records in the child manually, rather than automatically, though I am not certain this will avoid the requery situation.

As you and I am sure others have come across this situation, it would seem reasonable that there must be some preferred steps to accomplish this without breaking the framework which I am loathe to do.

Is your method of testing the IsNew() done as part of the requery hook, or have you found it necessary to modify the framework directly?


Thanks for helping me find the path!


Robert

>Have you stepped through the code to be sure New() isn't firing at all on the child? The reason I ask is that I remember there used to be an issue with setting the child's nRequery property to 1, if it's also set to create a new record when the parent adds a new record. Turns out that immediately after adding the new child record, the requery would trash it. We ended up adding code to test for IsNew() in the requery and it seemed to work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform