Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fatal error when LOCATE FOR field = form property
Message
From
08/01/2004 15:31:41
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
08/01/2004 12:59:11
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00865140
Message ID:
00865210
Views:
14
Hi Bruce


>After a Save, ListView is requeried to update the grid, and a LOCATE FOR iRecID = .nParentRecID is issued to move the record pointer back to the selected record. We typically don't index ListView because it usually contains only a couple hundred records and performance has not been an issue.

<snip>

> *!* But this works, qualify nParentRecID even though in a WITH THIS block

>
> *!* Now try to go back, this works if the form property has same name as TAG
> LOCATE FOR iRecID = .iRecID

LOCATE FOR condition = property should be avoided. Performance issues have been documented in FoxPro Advisor magazine. IMO, it is better to write code without performance problems than to have to deal with them later.

I would do this instead...

lnRecID = .nParentRecID
LOCATE FOR iRecID = m.lnRecID

As a side effect, you won' have the problems you're reporting either. ;)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform