Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set connection string using config file
Message
De
12/09/2008 05:01:56
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01303511
Message ID:
01346981
Vues:
23
>>If you want to switch between different databases, the connectionstring itself is the place for that.
>>Your tableadapters should always point to the same connectionstring definition of your app.config.
>>To switch to a different database, just change the connectionstring in your app.config.
>
>There has to be a better way if you want to access different databases with the same TableAdapters.

well, what's your definition of "better way" in this case?

If you want to connect to different databases, you will have to change the connectionstring somehow and you will want to change it in one single place only. The config file is that single place and it is very easy to change the connectionstring because its XML (text) only, unless its not encrypted.
Holger Vorberg
Germany
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform