how to approach unique user views


Neil Chambers

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 ConnectionString 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 ConnectionString based on the
user logging in. Currently the pages hold the connectionstring info with the
SqlDataSource control:

<asp:SqlDataSource ID="mySqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
SelectCommand="SELECT * FROM [view1]">

Q1. would it be possible to store the connectionstring id in a session
variable and have that used at runtime such that ConnectionString 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)?




Neil Chambers

oookay. so I think I am barking up the wrong tree. Membership, Roles &
Profiles seems to be what I am looking for.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question