Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1039

Re: How do I fix this error

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: How do I fix this error
Date 2012-05-10 23:53 +0200
Organization Erland Sommarskog
Message-ID <XnsA04FF3151DD17Yazorman@127.0.0.1> (permalink)
References <4fabfbd0$0$290$14726298@news.sunsite.dk>

Show all headers | View raw


Tony (johansson.andersson@telia.com) writes:
> I have tried with Visual Studio 2010 Proffessional and Visual Web
> developer express 2010 but I get the following error when I try to run
> the web site. I have also sql server 2008 installed. I addending a
> cource and when I try to run the web site that we have got as examples I
> get this error. 
> Does anyone know how to correct so I can run the examples ?
> 
> 
> Here is the error that I get
> *******************
> An attempt to attach an auto-named database for file G:\ASP Module 
> 3\CarsDB.mdf failed. A database with the same name exists, or specified
> file cannot be opened, or it is located on UNC share. 

Reading the error message, there appears to be three possibilities:

1) You already have a database CarsDB.
2) There is no file G:\ASP Module 3\CarsDB.mdf
3) G is a mapped network drive.

The AttachDBFilename is a connection-string option that I've never
understood the point with. Why not just attach the database once and
for all?

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How do I fix this error "Tony" <johansson.andersson@telia.com> - 2012-05-10 19:33 +0200
  Re: How do I fix this error Erland Sommarskog <esquel@sommarskog.se> - 2012-05-10 23:53 +0200
    Re: How do I fix this error "Tony" <johansson.andersson@telia.com> - 2012-05-11 00:27 +0200
      Re: How do I fix this error Erland Sommarskog <esquel@sommarskog.se> - 2012-05-11 09:02 +0200
        Re: How do I fix this error "Tony" <johansson.andersson@telia.com> - 2012-05-11 10:34 +0200
          Re: How do I fix this error "Tony" <johansson.andersson@telia.com> - 2012-05-11 11:14 +0200
          Re: How do I fix this error Erland Sommarskog <esquel@sommarskog.se> - 2012-05-11 12:54 +0200
      Re: How do I fix this error bradbury9 <ray.bradbury9@gmail.com> - 2012-05-10 22:44 -0700

csiph-web