Hi,
I am doing a sample VS 2008 project.
I have added a dbml file.On the designer,I have dragged a table "emp" from a database "Employee" which is in my server(for example Server1).
It created an app.config with connection string as
<connectionStrings>
<add name="LinQ2008.Properties.Settings.EmployeeConnectionString"
connectionString="Data Source=Server1;Initial Catalog=Employee;User ID=abc;Password=somepassword"
providerName="System.Data.SqlClient" />
</connectionStrings>
Next,I have added another dbml file.On the designer,I have dragged a table from a database "Employee" which is in a diffferent server(for example Server2).
Now in app.config the connection string is created as
<connectionStrings>
<add name="LinQ2008.Properties.Settings.EmployeeConnectionString1"
connectionString="Data Source=Server2;Initial Catalog=Employee;User ID=xyz;Password=somepassword"
providerName="System.Data.SqlClient" />
</connectionStrings>
My doubt is
(1) When two datasources/servers having same database name(for example Employee) are there,then if we drag a table from Employee database from "Server1", a connection string is created as "EmployeeConnectionString" in app.config.
If we drag a table from Student database from "Server2", another connection string is created as "EmployeeConnectionString1" in app.config.
How to have a common connectionstring name instead creating different connection strings.
Thanks,
Silpa