Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Issue with SetAlias() method?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00825335
Message ID:
00826179
Vues:
18
David,

>I believe that there is an issue with the setalias() function of kbizobj. In particular, it does not update the oExecutant property with the business object. This only occurs if the oExecutant property changes. So if you call setalias() before the oExecutant property is initially set, you will NOT encounter the problem. If, however, you save to one view, then call setalias(), and try to save to another view, oExecutant does not get changed to the new cursor object, and therefore the wrong view is updated.
>
>I think that all that needs to be done is to add a line or two in the setalias() method that updates the oExecutant object.

Are you using RemoteExecutantSave() in this scenario? I'm out of the office right now and just have a few minutes, but looking at the code for RemoteExecutantSave(), I see that it calls this.GetDataAccessObject() to determine which data access object to use. GetDataAccessObject() calls this.oDataEnvironment.GetCursorObject() with an empty tcAlias. GetCursorObject(), when passed an empty alias, gets the data environment's InitalSelectedAlias, which should have been set to the proper value when you call SetAlias().

If you're still having problems, let me know where along this logic loop the problem seems to occur!

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform