Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio not showing server name when adding connection

I'm using Visual Studio 2010 and SQL Server 2012. When I try to connect to SQL Server through Visual Studio, I don't get my server name on Add connection drop down menu.

like image 600
user3786234 Avatar asked Oct 25 '14 06:10

user3786234


People also ask

How do I add a server to Visual Studio?

Add a connection in Server Explorer To create a connection to the database, click the Add Connection icon in Server Explorer, or right-click in Server Explorer on the Data Connections node and select Add Connection.

How do I find the SQL Server name in Visual Studio?

Open up SQL Server Configuration Manager (search for it in the Start menu). Click on SQL Server Services . The instance name of SQL Server is in parenthesis inline with SQL Server service. If it says MSSQLSERVER, then it's the default instance.

How do I add a connection string in Visual Studio?

In Solution Explorer, double-click the My Project icon (Visual Basic) or Properties icon (C#) to open the Project Designer. Select the Settings tab. Enter a Name for the connection string. Refer to this name when accessing the connection string in code.


2 Answers

Go to SQL Server Management Studio to look for the correct Server Name and copy the value. Make all the configurations by yourself at the end just click Test connection button. If the connection is test successfully proceed with your work.

like image 85
mybirthname Avatar answered Oct 07 '22 00:10

mybirthname


If the database is in your local machine, Just put a . (Dot) in Server Name and select the database.

Add connection dialogue

like image 33
Venkataraghavan Yanamandram Avatar answered Oct 07 '22 01:10

Venkataraghavan Yanamandram