[英]Using data connections in Visual Studio to explore SQL Server Express database
I am using Entity Framework in order to create my models, but when I try to access the database from the data connections in Server Explorer, it does not work. 我正在使用实体框架来创建我的模型,但是当我尝试从Server Explorer中的数据连接访问数据库时,它不起作用。 I know the models are being created in the SQL Server Express instance running on my local machine, as I navigated to
我知道在导航到本地计算机上的SQL Server Express实例中正在创建模型时
Computer -> Program Files -> Microsoft SQL Server -> MSSQL10.SQLEXPRESS -> MSSQL -> DATA ->
and the database is in there. 数据库在那里。
Shouldn't my local instance of SQL Server Express show up in this window? 我的SQL Server Express本地实例不显示在此窗口中吗?
I read over this article from Microsoft which explains where database is stored. 我从Microsoft阅读了这篇文章,其中解释了数据库的存储位置。
Under server name type in \\\\\\SQLEXPRESS
or .\\SQLEXPRESS
(assuming you have installed the instance with default values) 在服务器名称下,键入
\\\\\\SQLEXPRESS
或.\\SQLEXPRESS
(假设您已使用默认值安装实例)
then you should be able to access the database from the dropdown list. 那么您应该能够从下拉列表访问数据库。
you need to select your machine name from the Server Name
dropdown as shown in below picture. 您需要从“
Server Name
下拉列表中选择计算机名称,如下图所示。
if your server is not showing in the list then simply open SQL Server note down that Server Name
and write it Manually. 如果您的服务器未显示在列表中,则只需打开SQL Server,记下该“
Server Name
并手动编写即可。
Here is an Example 这是一个例子
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.