Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDX for cursors
Message
De
23/03/1998 10:28:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/03/1998 10:25:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00086304
Message ID:
00086395
Vues:
21
>>>I am using a cursor for the recordsource of one of my grids. In the header click events I am creating a IDX index to sort the records in the grid which works great, but for some reason I can't get the cursor to hold more than one IDX file. Is this the normal for a cursor to only hold one IDX, or am I doing something wrong? Also if I set the order of the IDX to (DESC) it works fine, but I have to create the IDX index once again to reorder it to ASC. Any help greatly appreciated!!
>>>
>>>Thanks.
>>>
>>>John.
>>
>>
>>Try creating tags in a structural CDX file as an alternative. And, maybe, when the cursor is created create the tags you will need as well....in the header click method, just switch tags then.
>>
>>IE:
>>
>>CREATE CURSOR test (name C(50), address C(50), dob D, member L)
>>INDEX ON name TAG name
>>INDEX ON address TAG address
>>INDEX ON dob TAG dob
>>INDEX ON member TAG member
>>
>>*** The structural CDX is implied and created when you create the first tag.
>>
>>
>>In the Header click:
>>
>>SET ORDER TO TAG {whatever appropriate}
>
>John,
>Pretty nice. An addition to make it easier :
>
CREATE CURSOR test (name C(50), address C(50), dob D, member L)
>for ix=1 to fcount()
>  if !type("field(ix)")$"MG"
>     cKey = field(ix)
>     index on &cKey tag (field(ix))
>  endif
>endfor
>
>*Header click
>SET ORDER TO TAG {varread()}
>this.refresh
>Cetin
Oooops. Correction. No quotes in type("field(ix)") -type(field(ix))-
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform