Copied to clipboard

Flag this post as spam?

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


  • Brett Fullam 119 posts 629 karma points
    Jun 07, 2017 @ 15:59
    Brett Fullam
    0

    Trouble pointing to a new SQL database in Web.config ... found several examples ... none work

    I could definitely use some help here ... I have a new database set up in SQLExpress, but I haven't found a correct connectionString that works to connect it with my Umbraco site (which is still in Visual Studio 2015 at the moment). So far, all of the examples I found throw an error.

    <add key="umbracoDbDSN" value="Server=<your-server-address>;Database=<your-database-name>;User ID=<your-database-username>;Password=<your-database-password>;Trusted_Connection=False"/>
    

    I'm trying to connect to an SQLExpress database that's hosted locally. Is the above connectionString structure correct ...?

    My current connection string is currently pointing to an Umbraco.sdf (SQL Compact) using this string:

    <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
    

    Any help resolving this would be greatly appreciated.

  • Brett Fullam 119 posts 629 karma points
    Jun 07, 2017 @ 17:38
    Brett Fullam
    100

    OK ... found a "creative" way around the problem ... just installed another instance of umbraco using a locally hosted SQL database ... and ... problem solved.

    *It's important to note that you need to change a few permissions (SELECT specifically) in the database as well as rebuild your solution prior to achieving a successful build. Otherwise you'll see an install or upgrade screen when you try to build ... or it'll throw the error [object Object] *

    Here's what I used (taken straight from the other umbraco instance):

    <add name="umbracoDbDSN" connectionString="server=<your-server-address>;database=<your-database-name>;user id=<your-database-username>;password=<your-database-password>;providerName="System.Data.SqlClient"/>
    
Please Sign in or register to post replies

Write your reply to:

Draft