Pergunta

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:

  1. I build a database in SSMS
  2. in Visual Studio, I click on new item and select ADO.Net Entity Data Model
  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"
  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))' "

what is wrong? Is this different with SQL Server Express Edition?

Foi útil?

Solução

You should be using a connection string that connects to "Microsoft SQL Server" rather than "Microsoft SQL Server Database File".

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top