Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
1.80/5 (5 votes)
See more:
how i can modify connection Programmatically Using C#


http://s3.postimg.org/8yztz75hf/Capture.png[^]

after installing the application on another pc on the network , i need the user choose the server name ?
any idea?
Posted
Updated 1-Apr-15 11:12am
v2
Comments
Dave Kreskowiak 1-Apr-15 16:14pm    
Connection? WHAT CONNECTION?

NO, I'm not clicking that link.
Zoltán Zörgő 1-Apr-15 16:25pm    
Simple and easy. That dialog is for building a connection string. Locate the string and than you will see how you can change it.
Golden Basim 1-Apr-15 17:12pm    
after installing the application on another pc on the network , i need the user choose the server name ?
George Jonsson 1-Apr-15 22:03pm    
What is your question?
Do you want to connect to a database from a C# application?
In that case where is your code where you are stuck?
What you are showing is just a standard connection dialog.
Golden Basim 2-Apr-15 19:13pm    
i need to control on this dialog Programmatically

1 solution

You can use SqLConnectionStringBuilder. Create your own form for the user to enter details.

https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder%28v=vs.110%29.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900