Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange behavior with Select into Cursor
Message
 
À
19/03/2006 07:06:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01105635
Message ID:
01105645
Vues:
12
Thanks for the info.
regards

Gerard



>>I tried the following code:
>>Select * from MyDbf into Cursor MyCur
>>Select * from MyCur ---> Give an error
>>
>>Select * from MyDbf into Cursor MyCur where .t.
>>Select * from MyCur ---> works fine
>>
>>Am I missing something here...how can I get consistent results ??
>>
>>Regards,
>>Gerard
>
>Sometimes Visual FoxPro decides to use a filter on an existing table, instead of creating the cursor as a separate table. In this case, the cursor can't be used in subsequent SELECT statements.
>
>To avoid this, use the NOFILTER clause:
>
>
>select * from MyDbf;
>  into cursor MyCur;
>  nofilter
>select * from MyCur
>
>
>This requires VFP 6 or later (or was it 5? - not sure); in earlier versions, a workaround is to add an additional field, which is not part of the table:
>
>
>select *, .T. as UnusedField;
>  from MyDbf;
>  into cursor MyCur
>select * from MyCur
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform