Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Develop form usable in different database container
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00267564
Message ID:
00267855
Vues:
18
snip
>>I am trying to develop a system which could be used for many customers. My problem is I want to develop forms,queries,views etc for generic purpose. For example, When I develop CUSTOMER form, I want to use it for customer table in databse container of customer1 and use the same form for customer table in databse container of customer2. I guess, my question is how do I specify data source in form design which will have the same table name but in different database containers for different customer depending on selection of customer account.

Open the tables manually (not on the DE).

PUBLIC nWhatToOpen
nWhatToOpen = 1 && switch

in the load event:

IF nWhatToOpen = 1
SET DEFAULT TO \myclient1
OPEN DATABASE customer1
ELSE
SET DEFAULT TO \myclient2
OPEN DATABASE customer2
ENDIF
USE table1 IN 0


>
>I do a lot of this, due to the way our data is cycled, I have dozens of DBCs that are very similar and are constantly created and archived. I don't use the project for the DBCs, nor the DEs for tables, that cuts out a lot of problems. Opening things manually is easy enough with a few properties to hold path/DBC names, and just using the same alias on different DBC tables once they're open is simple enough for all the controlsources...
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform