0
votes

Here is what I've done so far...

I've downloaded SQL Server 2012 Express onto my machine-

successfully restored the database that I'd like to access through VisualStudio 2012 Pro

In VS2012Pro I've clicked on Add Connection in the Server Explorer, where I select Microsoft SQL Server (SqlClient).

In order to log onto the Server I've checked "Use Windows Authentication" (and in the SQL Server properties I've enabled the use of Use Windows Authentication and Use SQL Server Authentication).

Then I select the Database that I want to connect to, and when I test the connection or click the OK button, I get this prompt ---

"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).

In SQL Server my machine is listed as a registered server like this theMachine\sqlexpress.

What solutions can you think of to circumvent this issue, as I'm at a standstill after looking through Stack and Googling for a solution? I checked to see if SQLServer was running by doing Start --> Run --> Services.msc, and it was running.

1
what about using some line breaks and formatting? Please read the How to Ask page.Steve B

1 Answers

-1
votes

You need to start SQL Server and browser in order to connect.

Go to SQL Server configuration manager -> Select SQL Server service -> Right click on SQL Server -> Select Properties -> Select Service tab -> Select Automatic as start mode, then Start server. After that right click on Sql Server browser and select Start.