Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about indexes
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522095
Message ID:
00522151
Views:
10
>Does anyone know how I can create an index that would allow me to set a random order? Thanks,
>John

Do you want the same apparently random order each time your application uses the random order, or do you require that the order change each time it is used?

If the later, then you will need to bebuild the index each time it is used.

Do you need this index to view a set of records, for example in a BROWSE or GRID? Or, do you merely wish to process individual records one at a time in a random order?

If the later, then you could simply use:
GOTO (MAX( MIN( (RAND()*RECCOUNT()), RECCOUNT() ), 1 ))
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform