I have a program with a dataset on a windows form program that connect to a database. On the deployed server everything works ok. Then I added a table to the sql table and to the same dataset that worked in the past. It works on my local machine, but on the deployed machine it does not work. I had this problem once before and when I added a table to the dataset it added a hard coded path to the database. I've checked for this and this is not the problem. Anybody know what else I can check.
The program give the following error when opening the new table,
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) --->
I have two connections strings in my program. One for the local server and one for the deployed server. I simply add or remove the one for "ClubConnectionString1" in my app.config file on the deployed machine. When I added the table in the dataset it choice the wrong one, and therefore when deployed it couldn't connect.
To fix the problem I manually searched for "ClubConnectionString1" in the clubdata.Designer.cs of the clubdata.xsd file, and removed the 1 from ClubConnectionString1. That fixed the problem.