Print Page | Close Window

Dynamic Database Selection

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1549
Printed Date: 28-Mar-2024 at 5:57am


Topic: Dynamic Database Selection
Posted By: *Calsy
Subject: Dynamic Database Selection
Date Posted: 08-Nov-2009 at 5:26pm
Hi All, Just wondering if there is a way we can set what database a user connects to at runtime?
 
The situation is we will have many customers each having one database. But I only want to have one website for all customers. Therefore when a user opens the website maybe supplying a parameter than we connect to their customer database.
 
Therefore when we have a new customer come on we just need to set a new database for them and not a new website aswell.
 
Any help would be appreciated.
 
Thanks



Replies:
Posted By: davidklitzke
Date Posted: 10-Nov-2009 at 12:21pm

Have you looked at the Custom DataSourceKeyResolver?

Please go to the Learning Resources and find the documentation on “Custom DataSourceKeyResolver”.  It can be found from the “Business Object Persistence” page, under the “DataSourceKeys” sub-topic.



Print Page | Close Window