SQL Server - Error when trying to reference a .mdf file

Posted by Amokrane on Stack Overflow See other posts from Stack Overflow or by Amokrane
Published on 2010-05-03T07:44:30Z Indexed on 2010/05/03 7:48 UTC
Read the original article Hit count: 258

Filed under:
|
|

Hi,

For a NUnit test I need to reference a .mdf file from a .config file. Unfortunately, I get the following error message:

The FOR ATTACH option requires that at least the primary file be specified.

An attempt to attach an auto-named database for file
C:\....\*.mdf
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 

I looked for this error on google but didn't find anything that helped me solve my problem.

Any idea?

Thank you

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server