Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions with parent/child forms
Message
From
10/06/1998 16:30:45
 
 
To
10/06/1998 15:06:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00106873
Message ID:
00106917
Views:
23
So I should set up all the views/relationships that I'll need for the child in the parent datasession?

What if it's possible to call up the child property sheet without calling up the parent first? Can I set up a private datasession for the child, but only use it if it's not launched from the parent?

>Robert ---
>
>If you change the child form to Default datasession and leave your parent form as a Private datasession, you have the best of both worlds....the child form can participate in the same unique datasession as the parent.

>With this mechanism, you can place the child table(s) in the DataEnvironment of the parent form. Then all you need to do for the Cancel button on the main form is run through a TABLEREVERT for each >possible< parent and child table. Why? Because there will be no need to worry about whether or not they actually edited a particular child record. Just TABLEREVERT all open editable tables; if they didn't actually edit a child record nothing is lost anyway.

>>What is the best way to implement edits/undo's for parent/child records?
>>
>>We have an edit form that allows editing of a parent record, and shows a list of the child records. Selecting a child record brings up the edit form for the child. We would like the CANCEL button for the parent to not only cancel parent edits but also child edits.
>>
>>Our thought was to begin a transaction on the main form, and begin a nested transaction for the child form. Cancelling the child would rollback the nested transaction, while cancelling the parent would rollback the parent (and effectively rollback the child changes).
>>
>>This would seem to work well, except that the parent and child have private data sessions, so they don't share transactions.
>>
>>Should we have the child use the data session of the parent, or are we going about this wrong?
>>
>>Bob
>*******************************
>John S. Koziol
>"When the going gets weird, the weird turn pro"
>-Hunter S. Thompson (Gonzo)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform