Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best and fastest way for making a cursor
Message
De
22/06/2007 02:33:39
 
 
À
21/06/2007 19:57:29
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01234669
Message ID:
01234921
Vues:
13
>>I know;
>>As I said I do it sometime out of paranoya, for the same reason
>>why people (myself included) sometime put select myalias before endscan :)
>>Anyways I use this kind of construction mostly for report/preprocessing
>>purposes so never really gave me any problem.
>>But guilty as charged <vbg>
>
>Do in command window
>
>CREATE
>
>enter name as temp.dbf
>
>enter field1 as name of first field
>
>click indexes tab
>
>enter field1 as index tag name
>
>enter temp.field1 as expression.
>
>Click OK button. Error alias Temp not found.
>
>OK, so you can't do it that way. So do this instead.
>
>INDEX ON TEMP.FIELD1 TAG FIELD1
>
>That worked! Yippeee. Must be a GOOD THING!
>
>Now USE TEMP ALIAS SOMETHING.
>
>Oops Error again!?!? Alias Temp not found?!?!? Just because something works NEVER EVER means that it's the right way to do it.
>
>FIND THE RIGHT WAY TO DO STUFF AND ONLY DO IT! :)

All right, All right, All Right! :)

However, note that in this case we are talking about
create cursor command and resulting memory cursor. Reusing it again with different alias is not likely an option. As soon as you close it; poof ... it is out of picture (memory) for good.

Is this what you presented here only 'damage' that can happen or it can also
burn toaster in adjacent room ?? :))
Just kiddin' , but now real question;

Is there any damage that can be caused to index key itself if field name is
included when creating it? I belive that index created on a temp cursor this way is still healty;
or I am mistaken ?





*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform