Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to switch databases
Message
 
À
05/10/2008 22:33:56
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01352904
Message ID:
01352913
Vues:
21
>Hi,
>I have two databases, one is for company A another is for company B, which have same the table files,
>and I have a FORM for users to access the files depend on the selected company,
>how can I switch between the databases inside the FORM at the runtime ?
>
>Thanks.
>Derek

Just use the full SQL Server syntax, instead of SELECT * FROM TableName use:

SELECT * FORM DatabaseName.shema.TableName
If you use CAs that is easy.
Other way is to change connection to sql server.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform