Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas for passing records back to calling form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01624724
Message ID:
01624735
Views:
102
+1

>>Hi all,
>>
>>Funny it seems I have never had to do this before so soliciting ideas...
>>
>>One form calls another form to allow the user to pick a few records to insert on the calling form (e.g. half a dozen rows, perhaps 5 fields each). I originally wrote this to have the user pick the records and then before the form closed, I would insert these rows into the underlying table and close the form. Then on the calling form, I would requery the view that displayed these records. But this view is also updatable to I also needed to write out any changes in the original view before requerying. This then seemed "wrong" because the user has a cancel button on that form - if they at that point pressed Cancel, all changes would be dumped *except* for the changes in the view that I had just written out. (I should note that the called form uses a different data session).
>>
>>So then I thought I had better only make changes to the original view by instead passing back any rows to be inserted and inserting these into the original view.
>>
>>I know that I can pass back an object from the called form as it's return value (and that object can contain an array of the rows to be inserted) but I am wondering if others routinely do something else? I guess I could pass back an XML string and create a new cursor out of that.
>>
>>Any other nice ways to pass data back (and while we are at it, passing data forward). Is there any way to pass a data session back and forth?
>>
>>Thanks,
>>Albert
>
>What about using the same data-session and same view for both screens?
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Reply
Map
View

Click here to load this message in the networking platform