Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with IDX and setting order
Message
De
06/02/2008 12:08:48
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problems with IDX and setting order
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01290080
Message ID:
01290080
Vues:
63
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform