I currently have 2 databases with one website per DB. The databases are
simple collections of views and some tables holding keys for the views -
these DBs are exact copies of eachother, other than the item values needed
to generate different views. The two websites are also identical but simply
require different ConnectionStrin g items to point to the relevant database.
I am happy keeping the separate databases as some of the views, whilst
returning the same columns, may often require a bit of tweaking to satisfy
customer needs.
What I plan on doing is consolidating the web interfaces. It seems that all
I really need to do is assign the appropriate ConnectionStrin g based on the
user logging in. Currently the pages hold the connectionstrin g info with the
SqlDataSource control:
<asp:SqlDataSou rce ID="mySqlDataSo urce" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:ConnectionSt ring1 %>"
SelectCommand=" SELECT * FROM [view1]">
</asp:SqlDataSour ce>
Q1. would it be possible to store the connectionstrin g id in a session
variable and have that used at runtime such that ConnectionStrin g points to
a user defined variable?
Q2. what other approaches would be feasible (I'm guessing this nut has been
cracked once or twice before)?
Thanks,
n
simple collections of views and some tables holding keys for the views -
these DBs are exact copies of eachother, other than the item values needed
to generate different views. The two websites are also identical but simply
require different ConnectionStrin g items to point to the relevant database.
I am happy keeping the separate databases as some of the views, whilst
returning the same columns, may often require a bit of tweaking to satisfy
customer needs.
What I plan on doing is consolidating the web interfaces. It seems that all
I really need to do is assign the appropriate ConnectionStrin g based on the
user logging in. Currently the pages hold the connectionstrin g info with the
SqlDataSource control:
<asp:SqlDataSou rce ID="mySqlDataSo urce" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:ConnectionSt ring1 %>"
SelectCommand=" SELECT * FROM [view1]">
</asp:SqlDataSour ce>
Q1. would it be possible to store the connectionstrin g id in a session
variable and have that used at runtime such that ConnectionStrin g points to
a user defined variable?
Q2. what other approaches would be feasible (I'm guessing this nut has been
cracked once or twice before)?
Thanks,
n
Comment