? ? ? ?? recently in learning Mvc+ef, watch the video demo. EF this piece needs to involve the connection of the database, the example in the video is similar to the previous Beef Brisket news system database.
So, just steal a lazy, use this database, but in the attach time error.
???? errors such as the following:
??
?
??? At the beginning, there was a problem with the location of the database. So once again, a position is placed. is still invalid.
At last. Search the Internet for solutions.
Fortunately, this kind of problem is actually met, and there are several ways to solve it. I took two ways to share it:
? ? Method One:
Copy the file you want to attach to the default Data folder in SQL Server, and the attach will succeed. The path that you installed
? ? Method Two:
???? Use window to log in, do not use the SQL Mixed authentication mode login, also can attach the database.
? ? Both of these methods can be achieved, and as for the other methods, we can try them out.
Attach database failed for server xxx