Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create index tag of a readonly cursor
Message
 
 
À
08/10/2007 09:54:08
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:
01259411
Vues:
23
>>>>>
>>>>>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 ??
>>
>>You are right. NOFILTER makes a difference. Now I can create an index tag. Thank you very much.
>
>You're welcome. I did not have the problem as I set sys(3050) to a low value at the beginning of my startup
>
>=sys(3050,1, 64 * 1024 * 1024)
>=sys(3050,2, 16 * 1024 * 1024)
>
I have never changed the value of sys(3050) from the default. I try not to touch things I don't understand <g>.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform