Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tonny Christiansen 4 posts 24 karma points
    Apr 29, 2010 @ 12:52
    Tonny Christiansen
    0

    Cannot connect to embedded SQL DB

    Hi, I am trying to make setup where I connect to an embedded SQL DB (SQL Server 2008 Express edition). I have created the empty db in accordance with the wiki description and copied it to a data directory below the root. As per the initial installation (Umbraco 4.0.3 with ASP.NET 3.5 configuration) I provide this connectionstring as a custom connection string:

    datalayer=SqlServer;server=XTC-T500\SQLEXPRESS;AttachDbFilename=App_Data\UmbracoDB.mdf;Integrated Security=True;User Instance=True;Database=UmbracoDB

    When doing so i get the following error:

    Database connection initialisation failed. The installer cannot connect to the database.

    Any suggestions

     

  • Chris Dunn 210 posts 401 karma points
    May 04, 2010 @ 22:55
    Chris Dunn
    1

    Tonny,

    I believe you need the full path to the .mdf file within the connection string, such as c:\folder\folder\app_data\umbracodb.mdf.  I normally use the |DataDirectory|  substitution string in place of the path.  

    This is  an exact copy of my connection string in the web.config file running in your similar situation.  

    <add key="umbracoDbDSN" value="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\UmbracoDB.mdf;Integrated Security=True;User Instance=True;Database=UmbracoDB" />

     

    -Chris

     

     

Please Sign in or register to post replies

Write your reply to:

Draft