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:
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.
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
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
is working on a reply...