Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want my C# winforms projects connection string configurable during a setup by the client ( within a setup wizard) so that client can configure server setting as per their db-server name and password.
But am stuck thinking how to do that. Relay in need of a help.

am using vs2010 and sql server 2008 r2 as database.

Any body there willing to help will be highly appreciated.
Posted

1 solution

You can do this with a setup project. You will have to code the form yourself, but that's pretty easy. You can even emulate the "detect server" functionality you find on other installers:

Follow this to set up an install project
https://msdn.microsoft.com/en-us/library/vstudio/19x10e5c(v=vs.100).aspx[^]
 
Share this answer
 
Comments
CringTee 29-Oct-15 0:09am    
Thank you sir, for the link. Sir as am new to programming, i would like to request for an example or link to a tutorial for achieving database connection configuring form in a setup. Thanks
Andy Lanng 29-Oct-15 5:04am    
I'm sure there are better solutions out there but this basic form should get you started: Adding connection string during installation
One thing I would add is a "Test Connection" button that attempts to open a new connection with the settings the user entered.
CringTee 30-Oct-15 2:36am    
Thanks you so much sir. it has solved my problem

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