Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help with INDEX COMMAND
Message
 
 
To
05/07/2004 14:19:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00920784
Message ID:
00920789
Views:
18
Hi Alvison,

There're different kind of indexes in FoxPro and command you use to make one current would depends on which kind you're referencing. It's better to use the structural compound indexes. They're stored in a structural compound index file always has the same base name as the table and is automatically opened when the table is opened. For example,
* Create structural indexes
USE mytable EXCLUSIVE
INDEX ON field1 TAG field1
INDEX ON field2 TAG field2
...
INDEX ON field1+field2 TAG f12
...
USE

* Open table with order set 
*   may be slower than opening a table and setting order afterwards
USE mytable ORDER TAG f12
...
* Set order to another tag
SET ORDER TO TAG field1
...
* Set order using tag name stored in a variable - Name expression
lcTagName = "field2"
SET ORDER TO TAG (lcTagName)
>I am Newbie to Fox, I am teaching myself this, I am using DB with FPDOS26 and when it comes to Index, I go like SET INDEX TO varNAme but I get an error saying DB not INDEXED! what I am doing wrong friends?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform