Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Cannot open a connection to a SQL Express database; need help

$
0
0
I downloaded an example application from Microsoft demonstrating something I'm trying to learn. I opened up the App.Config file and found that it uses a .MDF file that comes with the download and SQL Express to work with it. I didn't have SQL Express on my machine, so I went ahead and downloaded it and installed it earlier this morning. I downloaded and installed SQL Server 2014 Express, 64-bit version.Next I got into Visual Studio and started to run it. It failed with a[quote]Cannot open database "SchoolDB" requested by the login. The login failed.[/quote]error message.So then I got into SSMS and connected to the SQLExpress database engine now on my machine. I saw that the database wasn't there (no real surprise here, I should have thought of that before trying to run the app in VS). However, my attempt to try to attach to the .MDF file also failed with the following error:[quote]Operating system error 5: "5(Access is denied.)"[/quote]I don't know if this has anything to do with the error that SSMS gave me or not, but I noticed that the download doesn't even have a .LOG file, so I can't attach to that anyway.So, is the problem that there's no .LOG file associated with the .MDF file? Or is there some other issue involved?

Viewing all articles
Browse latest Browse all 6525

Trending Articles