Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXE Has Error and APP Does Not
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00328341
Message ID:
00328435
Vues:
29
>>>I'm getting an error in an EXE, saying 'Unknown Variable' when I am setting the order of a table. I'm not using a variable, rather it is simply 'SET ORDER TO queryorder IN search'.
>>>
>>>The table is part of a container, and I am using long field names. The APP performs as expected, but the EXE is interpreting the 'QUERYORDER' tag as an unknown variable. The error is not referencing another line, because there is no error if I disable the 'SET ORDER' command.
>>
>>Look at the index expression for tag "queryorder". Does it contain any references that VFP can't resolve - e.g. field name that may have changed, FOR expression, etc.?
>
>Everything appears to be okay. If there was a problem with field names and expressions, the APP would mostly likely generate an error, too. The error is only occurring in the EXE. I have also packed the project, rebuilt all files, reloaded FoxPro, and restarted the PC, all with the same results.

Some of these types of errors occur because there are differences between the dev and runtime environments - various SETs, PATH, etc. IOW the runtime doesn't inherit a lot of "stuff" you take for granted in the dev environment. You could get the .EXE to write out DISPLAY STATUS to a file to check some of that.

You could also try SET ORDER TO TAG QueryOrder IN Search.

Have you tried deleting, then rebuilding, the index tag?

Also, I'm slightly concerned about your choice of names here. Neither "QueryOrder" nor "Search" are reserved words, but "Search" is the sort of word that might become one in the future, and "QueryOrder" is Query + Order, both of which are. I know the latter one is a stretch, but...

I can't remember if there's a limit on the length of a tag name. It might be 10, in which case you should still be OK. I usually go 9 or fewer, from habit with older versions.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform