I have more than one database and more than one client in single application.so I want In the basis of login user I want Create Dynamically Connection String.
Do you mean that you want to just pass in the user credentials dynamically to your connection string? I apologize as I still do not get your intention for "dynamic connection string"
Did you read through the first link I provided in my previous reply? You can set the conneciton string in code including setting data source, database, username and pwd. Again, what's your problem; just do it.
Member
15 Points
92 Posts
Dyanamically Connection String
Sep 17, 2013 02:13 PM|Javed Khan|LINK
Hi
I want to create dynamically Connection String .
In the base of Login of User.
Thanks
All-Star
101931 Points
20703 Posts
Moderator
Re: Dyanamically Connection String
Sep 17, 2013 02:24 PM|MetalAsp.Net|LINK
So what problem are you facing? You can set the connection string in code when bulding the SqlConnection object.
Refer: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx & http://www.connectionstrings.com/
Member
15 Points
92 Posts
Re: Dyanamically Connection String
Sep 17, 2013 11:31 PM|Javed Khan|LINK
hi
I have more than one database and more than one client in single application.so I want In the basis of login user I want Create Dynamically Connection String.
Thanks
Contributor
5231 Points
1602 Posts
Re: Dyanamically Connection String
Sep 18, 2013 02:47 AM|necro_mancer|LINK
Hi Javed,
Do you mean that you want to just pass in the user credentials dynamically to your connection string? I apologize as I still do not get your intention for "dynamic connection string"
Member
15 Points
92 Posts
Re: Dyanamically Connection String
Sep 18, 2013 03:07 AM|Javed Khan|LINK
No I want pass datasource,database,username,pwd from .cs page
All-Star
101931 Points
20703 Posts
Moderator
Re: Dyanamically Connection String
Sep 18, 2013 03:50 AM|MetalAsp.Net|LINK
Did you read through the first link I provided in my previous reply? You can set the conneciton string in code including setting data source, database, username and pwd. Again, what's your problem; just do it.