Click here to Skip to main content
16,016,134 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hiii.........


i am using Sql database in my window application.for making connection string i am using app.config. now after creating setup how can i change the connection string for instoling the project in other system with his own Sql password.
Posted
Comments
Anurag Sinha V 4-Apr-13 1:33am    
you can have another form in your project asking for user's server name, database name,login credentials and else and replace these stuffs in the connection string on a button click..This way wherever you install the form will first ask for the user's stuffs and then do the work...Try it

If it is a parameter you require from the user upon installation then you definitely should ask for it during the installation process [as suggested by Anurag].

If you are using a default server then it can work just like you provided, in the app.config. But then there should be an option to change that inside you application, in which case you can configure the app.config file with the edited values.

Good luck,
Edo
 
Share this answer
 
You should allow your setup program to do this.
Adding connection string during installation[^] should give you a fair idea on what to do.
 
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