Changing Application string connection

sullyman

Active member
Joined
Nov 11, 2009
Messages
37
Programming Experience
Beginner
I am working on a test database application and would now like to move this database to a production server and also modify the connection string.

What are the steps to modify the connection string in a VS2008 windows form application. Do i just need to edit the app.config file?

I ask this as i have already attempted to make a copy of the existing database and tried to connect a copy of the test application. I ran it first and it seemed to work fine but now has stopped working and i don't know what has happened.

The initial orginal copy is fine though
 
Hi, the string connection is in the app.config as follows

<connectionStrings>
<add name="DPSSystem.My.MySettings.TrainingConnectionString"
connectionString="Data Source=DEV;Initial Catalog=Training;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

It is a test application which works fine.

Now when i make a copy of the full application and change the connection string to the following, i recieve the error:

<connectionStrings>
<add name="DPSSystem.My.MySettings.TrainingConnectionString"
connectionString="Data Source=DEV;Initial Catalog=Employee;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>


I am working with datagrids etc. Could their connection strings be hidden elsewhere perhaps?
 
Now when i make a copy of the full application and change the connection string to the following, i recieve the error:

<connectionStrings>
<add name="DPSSystem.My.MySettings.TrainingConnectionString"
connectionString="Data Source=DEV;Initial Catalog=Employee;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

you pasted your conn str again, instead of the error
 

Latest posts

Back
Top