Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the file...

Last post 08-26-2009 5:04 AM by Ganesh@Nilgris. 2 replies.

Sort Posts:

  • Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the file...

    06-02-2009, 8:31 PM
    • Member
      2 point Member
    • iamsaltman
    • Member since 10-08-2007, 5:19 AM
    • Posts 14

     Database 'C:\Users\Tim\StarterKits\ClubSite\App_Data\Club.mdf' already exists. Choose a different database name.
    Cannot attach the file 'C:\Users\Tim\WebSites\DustyBallenger\App_Data\Club.mdf' as database 'ClubDB'.

    This error occurs when I first launch the site.  I am using VWD Express 2008 and SQL 2005 Express.  I am able to view the ASPNETDB.mdf and Club.mdf database using Database Explorer in VWD.  

    I also cannot attach to the AspNetSqlProvider using the Web Admin tool, but I can add users using the Web Admin tool.  

    I also have VS 2005, VS 2008, SQL 2005 and SQL 2008 on this machine.

    Thanks for the help.

    Tim

    Filed under:
  • Re: Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the file...

    06-03-2009, 12:09 AM
    I've run into something similar to this and I am not sure but I think although the database did not actually exist in the server, the database's files (.mdf and .ldf) were still in the instance data files dir
    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data [default directory]
    There are two ways to write error-free programs; only the third one works. ["Epigrams in Programming", by Alan J. Perlis]
  • Re: Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the file...

    08-26-2009, 5:04 AM

     

    iamsaltman:

     Database 'C:\Users\Tim\StarterKits\ClubSite\App_Data\Club.mdf' already exists. Choose a different database name.
    Cannot attach the file 'C:\Users\Tim\WebSites\DustyBallenger\App_Data\Club.mdf' as database 'ClubDB'.

    This error occurs when I first launch the site.  I am using VWD Express 2008 and SQL 2005 Express.  I am able to view the ASPNETDB.mdf and Club.mdf database using Database Explorer in VWD.  

    I also cannot attach to the AspNetSqlProvider using the Web Admin tool, but I can add users using the Web Admin tool.  

    I also have VS 2005, VS 2008, SQL 2005 and SQL 2008 on this machine.

    Thanks for the help.

    Tim

     

     

    problem would be in the web.config or post the web.config file

    Jai Ganesh. J , GSD ,India

    Please Mark As Answer If my reply helped you.
Page 1 of 1 (3 items)