Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ideas for passing records back to calling form
Message
De
17/09/2015 07:25:58
 
 
À
16/09/2015 17:19:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01624724
Message ID:
01624739
Vues:
108
>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?
>

See if this can be of any help
FAQ#29297
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform