Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
THIS.Requery() isn't requerying
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00108868
Message ID:
00109720
Vues:
31
Paul,

>I've got a business object that has a data environment made up of 5 views. Only one of the views needs view parameters passed. So in the Postinithook() method I added:
>
>DIMENSION THIS.aViewParameters[1,2]
>This.aViewParameters[1,VPARM_NAME] = 'vp_shopnum'
>This.aViewParameters[1,VPARM_EXPR] = 'This.shopnum'
>
>In another method I do the following:
>
>SELECT v_goals
>THIS.shopnum = lnLoop
>THIS.Requery()
>
> However, my view never gets updated. If I manually force the requery using the following code instead:
>
>SELECT v_goals
>vp_shopnum = THIS.shopnum
>=REQUERY()
>
>My view is requeried correctly. I've looked at the section on requerying objects and it looks pretty straightforward. I'm not really sure why the above code fails. I added a bit of code to the PostRequeryHook() method and it does get called so it seems that the requery() is being called correctly.>

The only view that gets requeried in the business object's Requery() method is the InitialSelectedAlias. Is v_Goals the InitialSelectedAlias?

If it *is*, then I recommend that you put a breakpoint in the business object's Requery() method (as shown below) and step through the code to see what's happing:

ACTIVATE WINDOW DEBUG
SUSPEND
DODEFAULT()

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