Home Dashboard Directory Help
Search

Cannot attach the file ‘{0}' as database '{1}' by Shimmy Weitzhandler


Status: 

Active


4
0
Sign in
to vote
Type: Bug
ID: 770758
Opened: 11/11/2012 10:55:32 PM
Access Restriction: Public
1
Workaround(s)
view
2
User(s) can reproduce this bug

Description

I'm encountering the exact issue as described here: http://goo.gl/HgRXM (read section "Cannot Attach to Deleted MDF File"), but the solution to the problem is not told there...

In short the issue is that after deleting the .mdf file, the following exception is thrown when I try to access the DB using EF 5.0.

DataException->EntityException->SqlException:
Cannot attach the file ‘{0}' as database '{1}'

I did delete the DB file and now I get that nasty error message when running the application expecting it to use it's initializer.
Details
Sign in to post a comment.
Sign in to post a workaround.
Posted by Shimmy Weitzhandler on 11/11/2012 at 10:56 PM
http://stackoverflow.com/a/13304437/75500