Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter and form or best way to update base table with cu
Message
De
25/08/2008 12:36:54
 
 
À
25/08/2008 09:28:56
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01341480
Message ID:
01341561
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform