Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'New child on new parent' not working
Message
From
16/05/2002 13:27:12
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
14/05/2002 13:11:58
Bill Breay
Custom Business Software
Arvada, Colorado, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00655885
Message ID:
00657618
Views:
30
Bill,

>I have some code in the 'on new' method of the child bizobj (which includes dodefault() ). If I stop the process in the 'on new' method, type 'set' in the command window and browse the view of the child record, I find the information added to the view in the 'on new' method showing up on the view.
>I then close the browse go back to the debugger and continue processing. After these steps, and I enter the data in the parent record and save the parent, the child record is in the child table!!!!!
>

>If I do not browse the view while in the 'on new' method the view apparently does not get updated to the table. As I said in my earlier message the Id# increments in the Id table (for the child record and the parent)in all cases.

"Browsing" any row-buffered view will commit your changes. If you want to check values in a view without committing changes, use the debugger's watch window. What I think you're seeing here is this...

When the parent's new record is added, it successfully adds the child record; you verified this by checking the child's ID table entry. Everything's great up to this point.

Now the nRequeryType setting kicks in. The child is told about the parent's record change, it requeries, and since you haven't yet committed the new child record, the requery blows it away.

As I mentioned above, when you "browsed" the child record, you committed it to the table, so when the requery happened, the requery picked up the child record from the table.

I'll have to check what I've done in the past to get around this, and post what I find.
---Jason
Previous
Reply
Map
View

Click here to load this message in the networking platform