|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 16, 2010 2:46 PM
Points: 3,
Visits: 10
|
|
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.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
IS it an ADO.NET or OLEDB connection string.. It makes a difference..
CEWII
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 16, 2010 2:46 PM
Points: 3,
Visits: 10
|
|
| 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.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
And you are using the SQLClient and not the oledbclient? Then that is wierd..
CEWII
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 16, 2010 2:46 PM
Points: 3,
Visits: 10
|
|
| 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.
|
|
|
|