Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with IDX and setting order
Message
 
 
To
06/02/2008 12:08:48
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01290080
Message ID:
01290082
Views:
14
Do you have spaces in the path?
Shouln't you open index first with ?
SET INDEX TO ...
>I have a grid in which I allow the user to click on the column header to set the order ascending or descending. I have a method to create an IDX file on the fly. In it I create a string containing the index command - something like:
>
>lcIndexCmd = "INDEX ON UPPER(TRANSFORM(" + JUSTEXT(toHeader.Parent.ControlSource) + ")) TO " + m.lcIDXName + " COMPACT"
>
>where toHeader is an object reference to the actual header that got clicked and m.lcIDXName is the name of the IDX file I'm going to create.
>
>I then issue a macro like, &lcIndexCmd. to create the IDX file. Next I do another macro command to "SET ORDER TO " + m.lcIDXName
>
>If I set m.lcIDXName = "_Temp" and run the code, things work fine. The index is created and the order is set. The issue I'm having is, if I set m.lcIDXName = "c:\SomeFolder\SomeSubfolder\_Temp" the macro to set the order crashes with "Command contains unrecognized phrase/keyword".
>
>The only thing that I can see that causes this error is the fact that the index name cannot have a full path and will only take a filename.
>
>Can anyone confirm this or anyone experience this?
>
>TIA
>Mike
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform