Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set connection string using config file
Message
From
12/09/2008 05:01:56
 
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01303511
Message ID:
01346981
Views:
22
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform