Okay so I am completely new to creating a database, and have been trying to create one in Visual Studio 2010

I found this guide on the web and have been following it pretty successfully till I came to spot that I can't get past

(here's the link - http://msdn.microsoft.com/en-us/library/dd193408.aspx)

Anyway I went to properties of my SQL Server 2008 Database Project that I titled "SQLClrDatabaseSandbox" (I am following the guide so I just named it like the guide said), and went to the Deploy tab.

After going to the Deploy tab I needed to fill in data for the "Target Connection:" field and this is where my problem lies.

I open this field to get the following dialog


But upon opening it, I have no clue what to enter into the Server name field.

I tried the name of my server "MYSQLTESTSERVER1" which is running, has TCP/IP enabled like all these guides have said (I had to manually enter the name because no data would appear on it's own in the drop down menu)

But the thing is when I tried testing the connection I get an error saying "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server".

I know the server is running, my SQL Server Manager Studio says so

Btw if someone could tell me how to keep this server local to my machine only that would be greatly appreciated. I am only needing to connect to the database locally for a project I am working on (and have no desire to make it anything more at the moment)

Thnaks in advance for help, I know this may seem confusing, but now you know how I feel

Recommended Answers

All 4 Replies

If I understood correctly you've installed SQL on your local computer and created an instance named MYSQLTESTSERVER1. If this is true then you need to enter localhost\MYSQLTESTSERVER1 as the server name.

PS: If you actually renamed your computername to MYSQLTESTSERVER1 then you try localhost or MYSQLTESTSERVER1.

I have tried all of these, and none have proven successful. I even tried my computer's name \MYSQLTESTSERVER1.

I either get Error 40, Error 26, or the database is not existant or not visible to specific user

make sure named pipes are enabled in the server configuration

Still no luck, enabled the named pipes with the SQL Server Configuration Manager

Here's the errors I get when I try each of the following combinations for server name

- provider: Named Pipes Proveder, error: 40 - Counld not open a connection to SQL Server

- This connection cannot be tested because the specific datavase does not exist or is not visuble to the specific user

- provider: Named Pipes Proveder, error: 40 - Counld not open a connection to SQL Server

my computer's name/MYSQLTESTSERVER1
- provider: Named Pipes Proveder, error: 40 - Counld not open a connection to SQL Server

- provider: Named Pipes Proveder, error: 40 - Counld not open a connection to SQL Server

I have tried all these and when I click "Test Connection" these are what I get. I would also like point out that when I try to select a server from the drop down list nothing appears.

I am able to access these threw my SQL Server Managment Studio, but VS 2010 refuses to talk to my 2008 R2 SQL server. This is starting to really irritate me, I have never had good luck with servers (the stupid guide off microsofts site was helpful till this point)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.