I have encountered with a problem. I was serfing the google how to change the mdf file location and found this post: How do I move SQL Server database files?. But as it usually happens I did an error. I have used this code:
USE master;
ALTER DATABASE foo
MODIFY FILE (name='DB_Data1', filename='X:\NewDBFile\DB_Data1.mdf');
and modified DB_Data1.mdf to DB_Data1_log.mdf.
And now I can't attach this database to sql studio or open it in Visual Studio.
I need help please!