MARKAND Bhatt
MARKAND Bhatt

Reputation: 2650

An attempt to attach an auto-named database for file **** failed

I added new database file in my solution's app_data folder in VS2008.

But when I tried to expand it from Server Explorer, I get this error

An attempt to attach an auto-named database for file .... failed.

Find the screen shot of the error which occurred in vs2008 IDE.

enter image description here

Can anyone tell me what the problem is?

And how to solve it

Upvotes: 2

Views: 2622

Answers (1)

steoleary
steoleary

Reputation: 9298

The error is clear in that dialog box, the file you are trying to attach is on a UNC share (any file path beginning with \\ is a UNC path), which is not supported. You need to move the file to the server you are trying to attach it to and reference it by it's local file name, such as S:\SQLdata\TimeCard.mdf

Upvotes: 1

Related Questions