Last post Feb 08, 2013 08:13 AM by aneeshvenkat
Feb 08, 2013 07:14 AM|Sandeep Shenoy|LINK
I have a situation,I have a web service which do some process, but there are multiple Databases which are going to be hosted,also may get wider so i dont know the excat number and they are not in one place. Is there anyway i can connect to these Database
without adding all the connections string in web.config. I mean when the user calls the web service from a place , use one DB. When another user from different place call the web service use another DB and so on. Like some login or passing the connection string
over the web service call mechanism. Or something else, any ideas are welcome.
Feb 08, 2013 08:13 AM|aneeshvenkat|LINK
Here are some Ideas of mine:
1. use one database for storing user information and also the database and server details. And Then, you can retrive the databse and server details whenever the user logins and initinate the connection based on the retrived detials.
2. IF all the databases using a same server, You may use "SqlConnection.ChangeDatabase" to change database.