Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best and fastest way for making a cursor
Message
From
21/06/2007 14:11:34
 
 
To
21/06/2007 11:53:34
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01234669
Message ID:
01234822
Views:
15
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform