Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Having problems with locate.. weird!
Message
De
30/09/2004 08:39:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
30/09/2004 04:23:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00947409
Message ID:
00947478
Vues:
15
With a SELECT - SQL statement, VFP decides whether it is more convenient to place a filter on an existing table, or to create a separate temporary table. So, your cursor might just work like a filter on a table. IOW, record #1 (from the original table) might not be included in the cursor. Also, just as ifyou use a filter plus an index, there is no guarantee that the records are in ascending order.

If you want to force VFP to create a separate table (and therefore, renumber the records), use the NOFILTER clause:
SELECT * FROM FCAB INTO CURSOR TBGRID NOFILTER
>hi thomas,
>
>no, record is not deleted. but i have set deleted on on my form.
>
>here, i have a grid in my form. recordsource is select * from fcab into cursor tbgrid.
>
>i have this code in my command click(),
>
>
>sele fcab
>go top
>locate for recno()=858
>if found()
>[some code]
>endif
>
>
>when i run this form, found returs to .f..
>
>i also find this out, go top does not point the record pointer to 1.
>
>when i sele tbgrid, found returns to .t.
>
>what could be wrong? pls help.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform