Answered by:

There is no SQL Server

Question

Hello.I am trying to add a new sql connection with vb.net 2010,2012,2013 (yes i tried them all).But in the "Add Connection" windows there is no sql server in "Server Name" dropdown.I checked sqlserver from services,its running.What
should i do? Thank you very much.

Answers

I don't have the same verion of VS that you do. Normally there are two methods of connecting to the SQL database

1) To connected to an mdf file

2) Connect to the Service that is automatically started when the computer is turned on or can be setup to be manually started

Method 2 is the prefered method and I will assume right now that the service is automatically started. It looks like from your screen shot on the left pane you selected data conmnection which is method 1. If you continue you should be asked to
browse for the mdf file on the local computer.

I would go back on the left pane an instead select computer that you have blacked out. If the database is on another computer then I would think you would use the shared point connection and choose the computer where the database is located.

All replies

Below are the normal connection string for SQL Standard and SQL Express. Notice that you use a "Data Source" (not a "Data Provider"). A Data Provider requires setting up a driver to make a connection. You can use the code below to
make the connection rather than use the Menu to add the connection. If you use the menu make sure you are selecting the Data Source, not the Data Provider.

Sorry. I could tell from you posting if the VS code was working. It appears that ODBC connection that is defined on the PC will work. Then forms and menu arre not very clear. Did you setup a database from the DATA menu before trying
to add a connection?

But in the "Add Connection" windows there is no sql server in "Server Name" dropdown.

Could you share me a screen shot about it? How can I repro this issue in my side with VS2010 in windows 7? Could you share me the detailed steps to repro this issue?

Do you mean that right click Data Connections -> Add Connecttion… in Server Explorer window? Do you mean that you couldn’t get the Sql Server option like the following screen shot?

Best Regards,

Jack Zhai[MSFT]<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

I don't have the same verion of VS that you do. Normally there are two methods of connecting to the SQL database

1) To connected to an mdf file

2) Connect to the Service that is automatically started when the computer is turned on or can be setup to be manually started

Method 2 is the prefered method and I will assume right now that the service is automatically started. It looks like from your screen shot on the left pane you selected data conmnection which is method 1. If you continue you should be asked to
browse for the mdf file on the local computer.

I would go back on the left pane an instead select computer that you have blacked out. If the database is on another computer then I would think you would use the shared point connection and choose the computer where the database is located.