Click here to Skip to main content
14,430,298 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi.
Its been an hours or day since I installed the Visual Studio 2015 community.

This VS2015 has its automatic installed SQL... When I conmect to the database, ot requires a Server Name...
I am clueless after I tried all the server names I knew. Please help me with this. Thank you in advance.

What I have tried:

I tried to google my problem, but it seems. every sql installed in a computer has its own server name which I think mine is unique.. correct me if Im wrong.
Posted
Updated 21-Dec-16 4:13am
Comments
[no name] 21-Dec-16 9:03am
   
Your server name is most likely "localhost"

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Simplest way is to create a new connection:
1) Open the Server Explorer pane.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource ("Microsoft SQL Server (SqlClient)" is probably right), then open the drop down by "Server name" - that will list all the SQL Server instances it can find. If it doesn't list any, click "Refresh" and try again.
4) Select database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

But I'd install a separate SQL Server Express instance on your dev machine - I'm not sure that the VS Community version of SQL includes SSMS, which is much more useful than the "built in to VS" db management.
   
Comments
Richard Deeming 21-Dec-16 10:48am
   
Or just download SSMS 2016, which is free:
https://msdn.microsoft.com/en-us/library/mt238290.aspx[^]
OriginalGriff 21-Dec-16 11:01am
   
They have unbundled it? Good idea...
I still prefer the Express edition though - it means I can make sure that I'm developing against the same version of SQL that production uses (in this case my web hosting company generally takes a couple of years to catch up to later versions and I want to be sure I'm on the same DB).
Richard Deeming 21-Dec-16 11:03am
   
You can still use SSMS 2016 with earlier versions of SQL. :)
OriginalGriff 21-Dec-16 11:04am
   
Yeah - but it's the DB version I want to match!
Member 12905345 21-Dec-16 18:57pm
   
hi.. I tried it over ans over again the procedure that you suggested.. By the way. I also have a separated installed sql server 2012. But I think, shoul I uninstalled the sql server 2012 and installed a SQL Server Express????? Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100