D
D
Dmitry Gavrilenko2015-02-19 13:18:35
visual studio
Dmitry Gavrilenko, 2015-02-19 13:18:35

What do you need to work with MS SQL Server Express in VS?

Hello. Not the first day I suffer with the problem of connecting the SQL server to Visual Studio.
I am currently learning C# .NET from Troelsen's book. Reached the head of ADO.NET. The author asks to connect to a SQL server and create a database. In the dialog box, enter the server name: local if the full version of SQL Server is installed, and (local)\SQLEXPRESS if SQL Server Express is installed.
The fact is that there is neither one nor the other in the drop-down list.
5be88c12eca54fab9e21a4c6751f94bb.png
When manually entered, local issues
cb90f12d75dd432e94ab43fe3983e3cc.PNG
with (local)\SQLEXPRESS
2494fb0074dd4b0c8bb20c94593d8d8d.PNG
At the moment, the following packages are installed from the official source: SQL Server Express x64 SQL LocaLDB SQL Management Studio x64 Apparently this is not enough.



I read that the SQL Server Browser service is needed, but it was not in any package.
dd8e4ed001ad4b1c9a79749f6c16d92b.PNG
One person suggested SQL Server Compact. There were no problems with installation and operation. But the functionality is too limited. I had to refuse.
All the "walkthroughs" from MSDN don't help with solving the problem.
The ADMIN server as I understood not absolutely MS Server. If you create a database in it and try to create a table, pressing Ctrl + S will save the sql file with a request to create a table. The table itself will not be created.
8ed13312fb51431ba43ef2f1d69a78e4.png
What should be done for normal work with SQL Server Express in Visual Studio? Maybe I downloaded the wrong packages?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-02-19
@senal

Try putting "." in the "Server Name" field, it is not necessary to select from the list there.

S
Sumor, 2015-02-19
@Sumor

You don't need SQL Server Browser.
SQL Server Configuration Manager shows that you have everything configured correctly.
The server name, in your case, is either a dot, or you can specify the name of the machine - as I understand it, this is ADMIN.
You have correctly described the table. To add it, you need to execute the written (generated) script (icon with an exclamation mark).
You can use SQL Management Studio. In it, perhaps, it is more clear without hints how to work with the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question