Dear Friends,
This "Dynamic ConnectionStrings" topic can be found at multiple places in the forum, but without real solution. I am reopening this issue once again with a hope to find working solution to this problem.
Here is the common scenario
"I am planning to use centralized database for user accounts and after authentication, the user(s) are connected to their corresponding database(s) in web portal. The login interface would ask for the following
Company Name: xxxxxx
User ID: xxxxxx
Password: xxxxxx
The user will be authenticated from central database, the connection string will be picked up from database or probably created at runtime. The portal is maintaining separate database for each user but with same schema. "
I have researched on forum for one-week literally to find the answer but couldn't succeed. There are some partial answers found in threads like
I do know to set the connection string for a DataAccessAdapter object by using its ConnectionString property, or using the DataAccessAdapter constructor overload. Also read "Using the generated code -> Application configuration through .config files" > the Catalog name overwriting section. Also read the following related comment by "Wala"
"- You may use Catalog name overwriting (SqlServer only) to specify an empty string. In that case, the DQE will not specify a catalog name in the generated SQL elements, which will make the SQL target the catalog specified in the connection string."
I have still unanswered questions in my mind like
- Should I use a separate LLBLProjects for User Database & Application Database or a single project can include DAL for both databases?
I am using Declarative Data Binding with Adapter in some forms. How it is ensured that DataAdapter is connected to right customer database?
Is there any way to setup ConnectionString once during User Sign-In to avoid using overloaded DataAdapter constructors (as it increases lines of code and also difficult to implement, if application is built half-way)
The things are jumbled up in my mind. It would be highly appreciatable, if some body from support team provides us a working sample of asp.net project for the above mentioned scenario. I hope, it would be very useful for the LLBLGen Pro Community.
Thanks in Advance.