locked
Getting Started - Help? RRS feed

  • Question

  • User-1841287622 posted

    I didnt even do anything yet and it already does not work.  Any ideas how to get started? Thanks, Chad

    Cannot create file 'C:\Documents and Settings\Chad\My Documents\My Web Site\ClubSite1\App_Data\Club_log.LDF' because it already exists. Change the file path or the file name, and retry the operation.


    Could not open new database 'ClubDB'. CREATE DATABASE is aborted.

    Cannot attach the file 'C:\Documents and Settings\Chad\My Documents\My Web Site\ClubSite1\App_Data\Club.mdf' as database 'ClubDB'.

    Line 2186:            this.Adapter.SelectCommand = this.CommandCollection[0];
    Line 2187:            DataSet.SiteSettingsDataTable dataTable = new DataSet.SiteSettingsDataTable();
    Line 2188:            this.Adapter.Fill(dataTable);
    Line 2189:            return dataTable;
    Line 2190:        }
    File activation failure. The physical file name "C:\work\ClubSite\App_Data\Club_log.LDF" may be incorrect.

    Sunday, November 1, 2009 10:08 PM

Answers

  • User290944018 posted

    Database name if using visual studio has .mdf ending, and database log file has .ldf file ending.  The log file is automatically generated when you generate the database.  In your web application file under App_Data check to see if ClubDB.mdf and ClubDB.ldf are already installed.

    Does your Server Explorer show any database connections?  (view, Server Explorer) If not left mouse click data connetions and then click  add connection.  The add connection dialog box will appear.  Enter server name, and under select a database click either select or enter a database name, or click attach a database file.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 1, 2009 11:09 PM

All replies

  • User530177176 posted

    Which version of VS you are using.

    Which version of SQL Server you are using. You are creating a database or only attaching an existing database.

    Sunday, November 1, 2009 11:06 PM
  • User290944018 posted

    Database name if using visual studio has .mdf ending, and database log file has .ldf file ending.  The log file is automatically generated when you generate the database.  In your web application file under App_Data check to see if ClubDB.mdf and ClubDB.ldf are already installed.

    Does your Server Explorer show any database connections?  (view, Server Explorer) If not left mouse click data connetions and then click  add connection.  The add connection dialog box will appear.  Enter server name, and under select a database click either select or enter a database name, or click attach a database file.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 1, 2009 11:09 PM
  • User-427821299 posted

    Make sure that the Database does not exist already in that folder where you are trying to create it.

    because you cannot delete any database untill you stop your SQL Server instance you won't be able to override the database already there

    in that folder.

    So either you try changing the name of the database or stop your SQLServer instance then delete the database and corresponding log file and then try to recreate it.

    This should help...


    Sunday, November 1, 2009 11:46 PM