Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 22-Dec-12 9:30am
SQLmis314
Edited 22-Dec-12 19:11pm
v3
Comments
Sandeep Mewara at 22-Dec-12 15:07pm
   
What error? Share the error and the line of code around which it happens.
SQLmis at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,769
1 Sergey Alexandrovich Kryukov 6,338
2 DamithSL 5,408
3 Manas Bhardwaj 4,816
4 Maciej Los 4,195


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100