Copied to clipboard

Flag this post as spam?

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


  • Jeff 74 posts 346 karma points
    Aug 10, 2015 @ 14:55
    Jeff
    0

    Error after switching from SQL CE to SQL 2012

    Hi,

    I have just moved my database from SQL CE to SQL 2012 using the Export SQL Server Compact package. I've ran the script but after updating the web.config to point the new database I get the following error:

    Server Error in '/' Application. Object reference not set to an instance of an object.

    Are there any other settings that need to be changed?

    Thanks, Jeff

  • Carl Jackson 139 posts 478 karma points
    Aug 10, 2015 @ 15:05
    Carl Jackson
    0

    I'd say it looks like your database settings are not correct.

    Most likely the server path / name.

    What does your connection string look like ?

    Thanks

    Carl

  • Jeff 74 posts 346 karma points
    Aug 10, 2015 @ 15:09
    Jeff
    0

    Hi Carl,

    I just seemed to fix it, I hadn't called the name="umbracoDbDSN" I'd given it a custom name but after changing it back (with the new string) it appears to be working now!

    So it was:

    <add name="customName" connectionString="Server=serverName;Database=dbName; uid=userName;pwd=password;" providerName="System.Data.SqlClient"/>
    

    But changed it to:

    <add name="umbracoDbDSN" connectionString="Server=serverName;Database=dbName; uid=userName;pwd=password;" providerName="System.Data.SqlClient"/>
    

    Thanks, Jeff

  • Carl Jackson 139 posts 478 karma points
    Aug 10, 2015 @ 15:24
    Carl Jackson
    100

    Ah yes - that would do it - The connection string name is coded into Umbraco.

    You can add aditional connections to the web config and use them from your own code if you like but the Umbraco one is fixed.

    Glad you made it work

    Carl

Please Sign in or register to post replies

Write your reply to:

Draft