Aniket Yadav

Aniket Yadav

  • NA
  • 33
  • 0

Switch Connection For The Database

Dec 7 2010 1:59 AM
I have One Weird Query.

Is it possible to switch from one database to other database programmatically?

For Eg:

I have one Master Database

Master Database:
CompanyID Password ConnStr
ABC0001 ****** MyConnStr1
ABC0002 ****** MyConnStr2

Now the user will login using his company credentials.
For Valid Login, The connection for the database will be changed taking the connection string from the master database.

And the user will be able to access the data from the other database On Same Server.

So is it possible to implement such logic...

If Yes then please provide me the idea...

Please Help Me

Answers (1)