Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FAQ re: setting database path at run-time...another way?
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00260939
Message ID:
00261134
Views:
25
I have my code in my "DataFrom" class load event.

It sounds like we are doing very similiar things except you have made your's more sophisticated. You should upload a sample of this to the files section.

>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".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform