I have pasted the following code from my dataConfiguration.cofig file.
<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
<xmlSerializerSection
type="JDV.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
JDV.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null">
<enterpriseLibrary.databaseSettings
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
defaultInstance="Chefs"
xmlns="
http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
<databaseType name="Sql Server"
type="JDV.EnterpriseLibrary.Data.Sql.SqlDatabase,
JDV.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</databaseTypes>
<instances>
<instance name="Chefs" type="Sql Server" connectionString="Sql
Connection String" />
</instances>
<connectionStrings>
<connectionString name="Sql Connection String">
<parameters>
<parameter name="initial catalog" value="Chefs_Dev"
isSensitive="false" />
<parameter name="Integrated Security" value="true"
isSensitive="false" />
<parameter name="server" value="JDVDEVSQL" isSensitive="false"
/>
</parameters>
</connectionString>
<connectionString name="Sql Connection String 2">
<parameters>
<parameter name="initial catalog" value="databasename"
isSensitive="false" />
<parameter name="Integrated Security" value="true"
isSensitive="false" />
<parameter name="server" value="SQLServer" isSensitive="false"
/>
</parameters>
</connectionString>
</connectionStrings>
</enterpriseLibrary.databaseSettings>
</xmlSerializerSection>
</dataConfiguration>
Now, if I make the following changes to the file .... How can I have the
data access block to pick up the second connectionString?
Hope that helps ....
<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
<xmlSerializerSection
type="JDV.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
JDV.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null">
<enterpriseLibrary.databaseSettings
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
defaultInstance="Chefs"
xmlns="
http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
<databaseType name="Sql Server"
type="JDV.EnterpriseLibrary.Data.Sql.SqlDatabase,
JDV.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</databaseTypes>
<instances>
<instance name="Chefs" type="Sql Server" connectionString="Sql
Connection String" />
</instances>
<connectionStrings>
<connectionString name="Sql Connection String">
<parameters>
<parameter name="initial catalog" value="Chefs_Dev"
isSensitive="false" />
<parameter name="Integrated Security" value="true"
isSensitive="false" />
<parameter name="server" value="JDVDEVSQL" isSensitive="false"
/>
</parameters>
</connectionString>
</connectionStrings>
</enterpriseLibrary.databaseSettings>
</xmlSerializerSection>
</dataConfiguration>