System.Data.SqlClient.SqlError: The operating system returned the error '5(error not found)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\LMH.MDF'. (Microsoft.SqlServer.Smo)
Use the RESTORE command to restore the backup. Don't use the Management Studio GUI. RESTORE gives you more control and better error messages. Be sure the target file path exists and that the server has read/write access to it.
I used the Transact SQL RESTORE command but I still get the same error Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Backup\LMHBKUP.bak'. Operating system error 2(error not found).
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I also modified access permissions on the file to grant full permissions but it dint help.
Thanks everyone!!.. i was able to solve this.. I created a db with the same name as the one to be imported.. added a .bak extension to the backup file bec it dint have an extension earlier..then used the RESTORE transact SQL with overwrite. and it worked..