SQL Server - Database 'Database' does not exist. Make sure that the name is entered correctly -


I am trying to generate my database table with my Entity Framework model, but when I execute it Error getting generation query:

  Database 'database' does not exist. Make sure the name is entered correctly.  

I'm only able to connect to a local server.

My connection string, which was selected by 'database.mdf', was generated by VS:

  metadata = ridge: //*/Models.Models.csdl | Res: //*/Models.Models.ssdl | Res: //*/Models.Models.msl; Provider = System Data.SqlClient; Provider Connection String = "Data Source =. \ SQLEXPRESS; AttachDbFilename = | DataDirectory | \ Database.mdf; Integrated Security = True; User Instance = True"  

The database certainly exists, But I have found that the only database to be taken on the server is called Master, Model, MSDB and Tempby.

Can anyone help?

Edit: I just realized that when you click on "execute SQL", the SQL Connection dialog allows you to connect to the server. But my DB is not on the server, it's just a user instance database but this is the only option, so how do I execute against my database? My database is open in 'Server Explorer'.

Connection string is referring to one what you intend? I could not possibly get the impression from this question.

Do not try to convert it to data source = server name \ instanem; Initial catalog = database; Integrated security = true;


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -