All-Star
35218 Points
9955 Posts
Moderator
Jan 09, 2014 07:02 AM|bbcompent1|LINK
Well, I sincerely hope you are connecting in code behind. If so, you merely pass the querystring to the codemapping web page like this:
Session["ConnStr"] = "Server=myServerAddress; Database=" + Request.QueryString("Client").ToString() + "; Trusted_Connection=True;
Doing it this way, you are connecting to the same database server, but this time it sets the connection string as a Session variable. Then in your code, you reference the connection string via the Session Variable.
All-Star
35218 Points
9955 Posts
Moderator
Re: Issue: Connect to different database based on QueryString parameter using DynamicData
Jan 09, 2014 07:02 AM|bbcompent1|LINK
Well, I sincerely hope you are connecting in code behind. If so, you merely pass the querystring to the codemapping web page like this:
Doing it this way, you are connecting to the same database server, but this time it sets the connection string as a Session variable. Then in your code, you reference the connection string via the Session Variable.