Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best and fastest way for making a cursor
Message
De
21/06/2007 14:11:34
 
 
À
21/06/2007 11:53:34
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:
01234822
Vues:
14
>>>dear all
>>>I want to make an empty cursor based on one of my free table structure.
>>
>>In addition to Sylvain suggestion
>>
>>
>>AFIELDS(laFields, "MyTable")
>>CREATE CURSOR MyCursor FROM ARRAY laFields
>>
>>
>>Additional few lines my come usefull to add extra fields
>>and index cursor;
>>

>>alter table alias() add column pick L
>>alter table alias() add column rec_no N(6)
>>index on myCursor.keyfield tag mykey
>
>Don't include aliases in index expressions.

Tought someone will chime inn on this :)
I know that, Here I put it for code illustration purpose.
However this never gave me any problem with cursors created this way.
Reason I wld put this especially with composite indexes is to 'ensure' (paranoya) that correct field will be used in cases when you make cursor duplicate to a table which is naturally still open and the same field exist in original table. It helps somewhat readability of code as well.

BTW remind me what was reason not to use it in this case. I knew that this is 'ofence' to coding discipline for some reason, but forgot exactly why <g>
*****************
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