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.
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]
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, IDC, India
Please Mark As Answer If my reply helped you.
iamsaltman
Member
24 Points
43 Posts
Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the file....
Jun 03, 2009 12:31 AM|LINK
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
sql error
FileFoundExc...
Contributor
2633 Points
428 Posts
Re: Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the f...
Jun 03, 2009 04:09 AM|LINK
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data [default directory]
Ganesh@Nilgr...
Contributor
6074 Points
2354 Posts
Re: Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the f...
Aug 26, 2009 09:04 AM|LINK
problem would be in the web.config or post the web.config file
Please Mark As Answer If my reply helped you.
holsher
Member
4 Points
2 Posts
Re: Database ... \Club.mdf already exists. Choose a different database name. Cannot attach the f...
Aug 13, 2011 07:17 AM|LINK
had similar problem.
Fix: in connectionString put your database name (with NO extension) as initial catalog
string connStr = "Data Source=.\\SQLEXPRESS;" +"AttachDbFilename = =|DataDirectory|\\DataBase.mdf;" + "Initial Catalog=DataBase;" +"Integrated Security=True;" +"Connect Timeout=30;" +"User Instance=True";sql error