Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create index tag of a readonly cursor
Message
De
08/10/2007 09:46:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01259376
Message ID:
01259401
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>>>I need to add an index tag to a cursor (cursor created with SQL Select). So far, the only way I can do it is by making the cursor READWRITE (in SQL Select).
>>>
>>>Or by creating index not as a tag but as a standalone index (.idx). The nice thing about cursor is that I don't have to clean it up, that is, VFP erases the file or somehow it is being cleaned. What about Standalone index on a cursor? Do I need to do anything for it or the index is also stored in a temp folder and gets cleaned up?
>>
>>Dmitry,
>>
>>I believe you can add one (and only one) index tag to a non-READWRITE select cursor. Vfp cleans the cdx when the cursor closes
>
>Gregory,
>
>Maybe I am missing something but I tried to add an index tag to a readonly cursor and get an error that cursor is ready only. Here is an example of how I did it:
>
>
>select * from mytable into cursor cur_mytable
>select cur_mytable
>index on myfield tag mytag
>*-- ERROR: cursor is readonly.
>
>
>You see anything I could be doing differently?
>
>Thank you.

Now, that is strange
select * from personnel into cursor pp
index on emp_id tag pp && ok
index on emp_id tag hh  && error: file ......tmp is readonly
I actually see the cdx in my tmp directory until the cursor closes

Maybe add: NOFILTER ??
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform