Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i couldn't make a connection with the database it keeps giving me errors can any one help pleas.the file in the link below

[^]

when a try to log in i get this error :

An attempt to attach an auto-named database for file d:\aspnet\lm\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Posted
Updated 22-Dec-12 18:11pm
v3
Comments
Sandeep Mewara 22-Dec-12 15:07pm    
What error? Share the error and the line of code around which it happens.
SQLmis 22-Dec-12 15:19pm    
when a try to log in i get this error :

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

Your error has its solution.. Make sure that in your database is not opened anywhere else or say you can't keep two databases with same name in one application folder.. This leads to conflicts...

Hope this info will help you..
 
Share this answer
 
First of all, Share your code here and I'll not download any file.

Perhaps according to your error your solution is here-
An attempt to attach an auto-named database for file ... failed[^]

An attempt to attach an auto-named database ....\aspnetdb.mdf failed[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900