Copied to clipboard

Flag this post as spam?

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


  • Jinesh 15 posts 95 karma points
    Aug 19, 2015 @ 11:35
    Jinesh
    0

    Umbraco form PROBLEM

    Hi,

    What is oledb Compatable connection string for sql server compact (default) database.

    normal connection string (got from server explorer db properties) is :

    "Data Source=C:\UmbracoDemo\App_Data\Umbraco.sdf"

    connection string in web.config is

    <connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
      </connectionStrings>
    

    Tnxx

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Aug 21, 2015 @ 08:02
    Nik
    0

    The connection string in your web config is more dynamic than the one you got from Server Explorer.

    |DataDirectory| tells the system to look for the app_data directory in the current directory of the application, in this case your website. At least that is my understanding.

Please Sign in or register to post replies

Write your reply to:

Draft