I have a project that I have just completed and now have created a setup project with visual studios wizard. How can I now personalize this so that I can change the database connection string before the program runs. I wanted to be able to change the Connection string in one of the options of the installation, is there any way to do this?
Setup Package and visual studio 2005
Collapse
X
-
Hi,
Yes,You can change the connection string after installation. Write your connection string in web.config file. So you can install your setup anywhere you want and can run it, by just changing the Appsetting in config file..
If you have any doubt regarding Appsettings, plaese refer following link
http://www.odetocode.c om/Articles/345.aspx
All the best :) -
You have to create an xml configuration file for your application. I believe you can do this by adding new item, then choose Settings File. You can create a connection settings inside it and you can also store other settings in a configuration file.
Here's a sample code inside a configuration file:
<configuratio n>
<appSettings>
<add key="Connection String" value="Provider =SQLOLEDB.1;... "/>
</appSettings>
Good Luck ^_^Comment
Comment