Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hi..

Is it possible to connect my website with 2 databases?. if yes, i am going to separate my client details into 2 databases. in this case how can i handle log in page and forward the client to their database in order to get their required details.
Posted
Comments
Maarten Kools 17-Jan-14 3:53am    
I would either just have two websites, or restructure the database design so that you can separate things for different users. Of course it would be possible to use two different databases, there's no technical limitation to it, but save yourself the trouble and don't.
Ankur\m/ 17-Jan-14 4:22am    
I agree.

Normally, this kind of practices are avoided. You can still have one database and manage properly to show only particular user related data.
 
Share this answer
 
Of course you can. You can connect to as many databases as you like but as others have pointed out you probably shouldn't.

All you have to do is have another connection string and use that one. They can be named in your web.config and then referenced by name.
 
Share this answer
 
Google search - multiple database asp.net[^] - this should give you a start. But do consider the suggestion given by the other poster in the comment. Also I would analyze the downsides of this technique before proceeding. The search link should give you enough information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900