Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want an error for VFP Open dialog
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00885697
Message ID:
00885713
Vues:
22
>I want intercept the VFP action into a try/catch/entry
>without show the Open dialog for this commands.
>
>SELECT 0
>SELECT * FROM ALIAS() && this open a dialog
>GO TOP
>SET FILTER TO A=B
>* ......
>
>
>Thanks
>
Fabio,

VFP will automatically open the file whose primary portion of the file name matches the alias used in the FROM clause if the alias is currently not used. If, in searching the VFP path, it does not find it, it presents the open file dialog so that the user may locate it. This behavior has been present at least since Fox 2.0, so it is old and well known.

The workaround is simple, check to assure that the alias is in use using the USED() command. If it's not open the file. I use a function that returns a boolean value indicating whether or not the attempt to open a table succeeds. Something similar should be used here.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform