ive set up a connection string and whenever the program hits myConnection.ConnectionString, it will appear such an error :

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)

with saying SqlException was unhandled.

ive follow all instructions with the TCP, UDP. all of them are enabled already.

including all the firewall ports. sqlserver and sqlbrowser both are working properly as well.

thank u. appreciated. if u ned anymore detail, im most willing to provide it.

fyi, im using sqlexpress 2008 and visual studio 2008.

its an application based connection with database with app.config for information.

Error says that the SQL-Server instance is not running or not installed. You can verify the database/server-instance using server-explorer in VS.NET.

PS: The name of the instance of sql-Server express database is .\SQLEXPRESS.

the server instance ive set to .\SQLEXPRESS. ive initialize it inside the connection string already.

but the same old error kept coming back when the program hit the code

myConnection.Open(); and the error pop up.

>but the same old error kept coming back when the program hit the code

You can also verify the sql-server connection using Server Explorer menu option in Visual Studio.NET.

This article has been dead for over six months. Start a new discussion instead.