简体   繁体   English

数据库优先与商业版本

[英]database first with commercial version

I have SQL Server 2012 Enterprise Edition and Visual Studio 2013 Ultimate and wants to create an entity data model for my Web Application, these are the steps I do: 我拥有SQL Server 2012企业版和Visual Studio 2013 Ultimate,并且想要为我的Web应用程序创建实体数据模型,这些是我要做的步骤:

  1. I build a database in SSMS 我在SSMS中建立资料库
  2. in Visual Studio, I click on new item and select ADO.Net Entity Data Model 在Visual Studio中,我单击新项目,然后选择ADO.Net实体数据模型
  3. from its wizard, I click on new connection, when I want to select the database that I have build in step 1, it says "this file is in use. enter a new name or close the file that's open in another program" 从其向导中,单击新连接,当我想要选择在步骤1中建立的数据库时,它会显示“此文件正在使用中。请输入新名称或关闭在另一个程序中打开的文件”
  4. I take it offline in SSMS, then I can select it, and now it says " can't open database ((path database)) requested by the login. The login faild. login faild for user '((Pc Name and User))' " 我在SSMS中将其脱机,然后可以选择它,现在它显示“无法打开登录请求的数据库。(登录数据库失败。登录失败。用户'((Pc名称和用户)登录失败)'“

what is wrong? 怎么了? Is this different with SQL Server Express Edition? 这与SQL Server Express Edition是否有所不同?

You should be using a connection string that connects to "Microsoft SQL Server" rather than "Microsoft SQL Server Database File". 您应该使用连接到“ Microsoft SQL Server”而不是“ Microsoft SQL Server数据库文件”的连接字符串。

The errors indicates that you're trying to connect directly to the database file, which isn't the right way to connect to a full-blown SQL Server database, and connecting to a file only works via Express Edition. 该错误表明您正在尝试直接连接到数据库文件,这不是连接到功能强大的SQL Server数据库的正确方法,并且连接到文件只能通过Express Edition进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM