Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do not understand INDEX ON
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00183833
Message ID:
00183901
Vues:
13
>Rich,
>I wouldn't say you were 'full of it', but if you create a non-structural tag with the 'OF' clause, you don't need the table opened exclusively. I believe it's been this way for many versions. This is the only real advantage of this type.
>Mark

Er ... ah ... um ... OK, I've picked up my jaw from the floor.

Well, I guess I would never have known about this because I've never used a non-structural CDX file. I've only used structural CDXs (since they became available), and IDXs for "temporary" indices.

If you can create temporary TAGs without having exclusive use of the file, this is indeed useful to know! Maybe I'll stop using IDXs for temporary indices!

This may help Brenda (and others):

INDEX ON [fieldexpr] TO [idxfile] [COMPACT]
Creates an IDX index file and sets your order to it. An IDX is a file which can only contain one index expression (and all its keys).

INDEX ON [fieldexpr] TAG [tagname]
Creates a TAG in a structural CDX file. A structural CDX file contains multiple TAGs (index expressions). The term "structural" refers to the fact that the associated DBF contains a link to the CDX in its file header. A DBF can have only one "structural" CDX. If it has one, this CDX is automatically opened and maintained when the DBF is opened.

INDEX ON [fieldexpr] TAG [tagname] OF [cdxfile]
Creates a TAG in a non-structural CDX file. This is just like a structural CDX file except that the DBF has no link to it, so it isn't automatically opened with the DBF. This type of CDX file must be opened explicitly using SET INDEX or SET ORDER command, or with INDEX or ORDER clause of the USE command, just as IDX files must be.

Anyone who can add to this or correct it, I'd welcome that, of course. Until today, I thought "OF [cdxfile]" still created or used a structural CDX if you specified a file with the same name as the table (except extension, obviously). I don't claim perfect or complete knowledge of Fox...just almost! ;)

P.S. - I didn't mention FOR clauses because I never make filtered indices. Filtered indices are unusable by Rushmore.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform