I am doing a project for a certain bank. They do not have a centralized database. They are using multiple databases for each town, for example they have their own database server in the Philippines, the same way they have their own database server in other countries.
They are using different database servers each country for their local application.
Is that possible for a web service to have multiple database connection string?
For example if i am currently located on australia, if I am going to register, the connection string will be use is the database for australia.
Any suggestions please, if you have , it be much appreciated. Thanks!
I'm assuming that your (centralized) web service can connect to any / all of the databases. You can certainly have multiple connection strings
<connectionStrings>
<add name="DbForPhillipines" connectionString="Data Source=1.2.3.5,1433;Initial Catalog=BankDB;User ID=user;Password=pass"
providerName="System.Data.SqlClient" />
<add name="DbForAussie" connectionString="Data Source=11.12.13.15,1433;Initial Catalog=BankDB;User ID=user;Password=pass"
providerName="System.Data.SqlClient" />
</connectionStrings>
You would then need to associate the connection string name with each user (either directly e.g. User.ConnectionString name or preferably through indirection, e.g. User => Country => ConnectionStringName)