I've always tended to use a "minimalist" connection string. Usually, this will consist of the provider, the Data Source (or Server), and the Initial Catalog (or Database). Latterly, I've added in the application name.
I've always had Visual Studio create the connection string and then trimmed it manually.
I've been using .NET for about 6 months now and have just got to the point of releasing my application. I set it up so that by default, it would look at the final Production version of the database and by setting command line options, it would point to alternative development databases. Last week, I added a new test database so that we could perform final testing prior to release, and I couldn't make it connect, even though all I had to do was change the server name. I just got a message back saying "Network Error". Using the .NET Studio, I could see the database and query tables etc without any problem.
In the end, I had to expand the connection string out to what the Studio set it to originally to make it work.
"data source=SERVER;initial catalog=DATABASE;integrated security=SSPI;"
which works on all my other machines. To get it to work on the test machine, I had to use:
"data source=TESTSERVER;initial catalog=database;integrated security=SSPI;persist security info=False;workstation id=E08116-2K1;packet size=4096"
I asked our DBAs and they couldn't come up with an answer.
Why would this be so?