Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memorize order of a index
Message
From
29/09/1998 05:37:40
 
 
To
29/09/1998 02:10:16
Annibale Freda
Freda Annibale
Rome, Italy
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00141777
Message ID:
00141808
Views:
16
>Hi,
>How I can memorize the order of a index in a variable for after restore.
>
>In Clipper I use indexord() and in VFP I do not found nothing of similar.
>

Try SET('ORDER') - this will return a string identifying the active index on the currently selected table (if no order is set, it will return an empty string.) You can restore the order using SET ORDER TO.

Example:
USE MyTable
SET ORDER TO MyIndex
DO SomethingThatMightChangeOrder
*and go on from here

PROCEDURE SomethingThatMightChangeOrder
LOCAL cMyTableIndexOrder
SELECT MyTable
cMyTableIndexOrder = SET('ORDER')
SET ORDER TO SomeOtherTagMaybe
*Do some stuff
SELECT MyTable
IF ! EMPTY(cMyTableIndexOrder)
   SET ORDER TO (cMyTableIndexOrder)
ELSE
   SET ORDER TO
ENDIF
RETURN
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform