Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a different database depending upon user
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00125834
Message ID:
00125836
Vues:
19
>O.K. this one's kinda tuff to describe but here goes..
>I have a working system to track client data. The same system is used at the same location for another county. The databases need to be completely seperate from one another. All forms and reports remain the same. What I have done is duplicated the database and stored the two seperate databases in two seperate directories. They have the same name and same tables (completely identical except for the data). At sign on to the system I set the path to the database directory based upon the user sign on. Here's the problem....each form has a data environment and the database property is set to the original dbc path location. The only way to I have found to remedy this is to set the database property for each table in the data environment to the correct path based upon the user. As you might imagine this will take a very long time since each form has numerous tables and there are a lot of form. It seems there should be an easier way but I can't seem to come up with anything. Any and all help
>would be greatly appreciated. If this post is too long sorry but It's kinda hard to put all this in writing sometimes.

Jamie,

You can put code into the DataEnvironment BeforeOpenTables event which re-sets the path. There have been several recent threads about this, and since you're PUTM, I suggest a search for ALL the info instead of a quick re-hash. You can add this code to your base form, and not have to update every form.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform