Having trouble useing SQL Server 2000 for the Club Starter kit on my local machine. RRS feed

  • Question

  • User2120377665 posted

    Hi All,

    I have downloaded and installed the club strater kit. I created a new website based on the starter kit. I then created a blank database in SQL Server 2000 on my local machine. I then added an account to  that database and ensured it was set as the owner. I then edited the web.config file. Please see the edits here:


    <!--add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;Integrated Security=true;AttachDBFileName=|DataDirectory|Club.mdf;User Instance=True" providerName="System.Data.SqlClient"/-->

    <add name="ClubSiteDB" connectionString="Server=DAYDREAM;Database=ClubSite1;uid=Club1;pwd=Club1;AttachDBFileName=|DataDirectory|Club.mdf;" providerName="System.Data.SqlClient"/>


    When I ran the project for the first time It said it was unable to create the database as it was unable to login to master to create the database. Error looked like:

    CREATE DATABASE permission denied in database 'master'.
    Could not attach database 'ClubSite1' to file 'C:\Documents and Settings\DREAMFREE\My Documents\Visual Studio 2005\WebSites\ClubWebSite1\App_Data\Club.mdf'.

    Any ideas?


    Friday, March 17, 2006 11:08 AM

All replies

  • User1923026465 posted

    Try to remove AttachDBFileName=|DataDirectory|Club.mdf;" and it should work.  See example connection string below...

        <add name="ClubSiteDB" connectionString="machinename; Database=dbname; User ID=username; Password='password'; Trusted_Connection=False" providerName="System.Data.SqlClient" />

    Friday, March 17, 2006 11:26 AM
  • User2120377665 posted
    Spot on - Thanks
    Friday, March 17, 2006 11:37 AM