Larry Brister
asked on
App Setting Data Key
Is there a way to save my data source keys in a text file list which the Web.Config reads?
If not...what is the best way of adding an appsetting data source name like the one below without having to kick anyone off of the server?
<add name="myGG" connectionString="Data Source=myDataBase;Initial Catalog=myGG;Integrated Security=True" providerName="System.Data. SqlClient" />
If not...what is the best way of adding an appsetting data source name like the one below without having to kick anyone off of the server?
<add name="myGG" connectionString="Data Source=myDataBase;Initial Catalog=myGG;Integrated Security=True" providerName="System.Data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please watch for follow-up questions
<add name="myGG1" connectionString="Data Source=myDataBase;Initial Catalog=myGG;Integrated Security=True" providerName="System.Data.
<add name="myGG2" connectionString="Data Source=myDataBase;Initial Catalog=myGG;Integrated Security=True" providerName="System.Data.
<add name="myGG3" connectionString="Data Source=myDataBase;Initial Catalog=myGG;Integrated Security=True" providerName="System.Data.
^ for example.
Then have another section where you configure which to select
<add key="MyConnectionToPick" value="myGG2"/>
So in your code instead of stating you want specifically "myGG2" you say you want the connection stated in MyConnectionToPick.