Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THIS.Requery() isn't requerying
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00108868
Message ID:
00109720
Views:
32
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform