Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter and form or best way to update base table with cu
Message
From
25/08/2008 12:36:54
 
 
To
25/08/2008 09:28:56
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01341480
Message ID:
01341561
Views:
10
>I have a set of records for a carrier that I display on a grid on a page of a pageframe. All kinds of issues using a filter - shouldn't use THISFORM, can't use a memory variable defined in the INIT, etc. How would I best handle the filter condition in a form, or, what would be the best way to use the resulting cursor from SQL run on a base table to update back to the base table? I don't care which at this point.
>

"Set Filter" is one of the rare occasions to use a ¯o expression without bad conscience:
Local lcFilterValue
lcFilterValue = '5'
Set Filter To numericField = &lcFilterValue
The actual problem with Set Filter on a grid.RecordSource (or a Browse) is that it works slowly (because the filter is not getting evaluated only once but almost permanently).
That's why a SQL Where filter of a Parameterized Local View or a CursorAdapter makes a much better grid.RecordSource.
In VFP9, the new grid.Optimize property is supposed to cure the Set Filter symptoms.


hth
-Stefan
Previous
Reply
Map
View

Click here to load this message in the networking platform