Last post Jun 16, 2010 09:22 PM by gerardo gala
Jun 16, 2010 12:37 PM|gerardo gala|LINK
I have 1 Dynamic Data Website. I have a lot of databases - one for each customer. All databases have the same schema.
How do I set up my Dyanmic Data Website to point to a different database for each user at runtime? The users will log in and depending on their username, I need to point the Dynamic Data Web to a particular database.
Jun 16, 2010 01:47 PM|archimedes09|LINK
You can add many connectionstrings in your web.config file. Depending of the user you can use any of this connections. The only thing is how you will define with user with connectionstring will use .
Jun 16, 2010 02:02 PMfirstname.lastname@example.org|LINK
Jun 16, 2010 09:22 PM|gerardo gala|LINK
Thanks for the effort but your approach would not work because the code in .dbml fires before the Form_Load event of the default.aspx page.
Somehow I need to manipulate the System.Data.Linq.Mapping.DatabaseAttribute but I don't know how.