October 22, 2009 at 3:28 pm
I have a VS2008 application and a database on SQL Server 2005 Express installed on the SQLEXPRESS instance on the local computer (same computer running the application). Until about a week ago when I had 18 security updates installed by Microsoft everything was working fine but now I cannot connect to the database getting a "server not found or not accessible" error (Named Pipes Provider error 40 - Could not open a connection to SQL Server). I can connect to the database from SQL Server Management Studio and can get a connection to the database from within VS2008 without problem but the application will not connect. I have resorted to Integrated Security and am using this connection string:
.ConnectionString = "Data Source=AGM_T3500\SQLEXPRESS;Initial Catalog=MAPS;Integrated Security=SSPI"
This connection string works both in the Server Explorer in VS2008 and in Management Studio. What would make it not work from the application?
I have SQL Server configured for both Windows and SQL Server authentication and have the server configured to allow remote connections.
Any suggestions will be most appreciated.
October 22, 2009 at 3:35 pm
IS it an ADO.NET or OLEDB connection string.. It makes a difference..
CEWII
October 22, 2009 at 3:45 pm
ADO.NET. I don't understand how I can construct the connection from Server Explorer in VS2008 and it connects fine but then fails when the application runs using the exact same connection string. I just tried it using SQL Server authentication and, again, it works fine in Server Explorer but not when the app runs. Thanks for the prompt reply.
October 22, 2009 at 11:20 pm
And you are using the SQLClient and not the oledbclient? Then that is wierd..
CEWII
October 23, 2009 at 1:13 pm
Yes, the SqlClient.SqlConnection. What is most wierd about it is that everything was working fine until I applied the security updates last week, then it stopped working. I don't know if that is cause and effect or just coincidence but it is sure suspicious - I couldn't find anything about that on an internet search. My development gurus at work suggested that I try the ODBC connection to see if that works so I guess I will try that next.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply