Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FAQ re: setting database path at run-time...another way?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00260939
Message ID:
00261127
Vues:
24
Or, you can avoid cutting and pasting by driving the dbc and table locations in your app from a separate FileLocation table which contains the table names and paths.

Say your form needs TableA. Put your code to lookup the path of TableA in the Load event of your base class form. Subclass the form to make your app form(s). When instantiating the subclassed form, pass the table name or dbc name as a parameter. The lookup code will access the FileLocation table and open the tables / dbc's necessary for this form.

As an added bonus, my FileLocation table has an added field populated with either Test of Prod. This permits me to easily shift between test location and production locations with an extra paramater "Test" or "Prod".


My Show Me The Code Web Site


Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform