Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using multiple databases within application
Message
From
14/02/2000 14:46:17
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
14/02/2000 13:55:38
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00331825
Message ID:
00331871
Views:
31
>my DBC name is Acme.dbc and this dbc contains several tables.
>the user can create a new Acme.dbc <<snip>> in other directories.
>How can I let my application know which Acme.dbc to open and also, when a form >is opened, ensure that the tables from the desired Acme.dbc database are opened?
>Here is my directory structure:
>APPDIR\
>\Acme1\
>\Acme2\
>\Acme3\
>If a user chooses Acme.dbc from \Acme2\, I want only those tables to appear in the forms when the forms are called.

I'm not sure, but i think you need to investigate Data Sessions. You'll probably have a lot of thinking to do with how to keep track of this stuff while programming it.

My suggestions would be to name the DBC according to the user, and place the contained tables in the separate directories. Then you would just explicitly name each table User1!table1, User2!table1, etc. Likewise, the "main" tables would be something like Corp99!table1 and Corp00!table1 for maintaining any arhived data.

App\DBCs
App\Corp\
App\User1\
App\User2\
etc.

The DBCs directory would contain all the DBC files for the sake of an easy pick-list. the userN directory contains the similarly named tables, which the DBC would keep straight for you. (ex: Use Table1 - automatically opens the table1 file from the location registered in the User1.dbc)

Do you intend to have multiple (same-name) tables open simultaneously or several (same-name) tables that open serially/one .DBC at a time?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform