Copied to clipboard

Flag this post as spam?

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


  • Tony Groome 261 posts 804 karma points
    Dec 30, 2014 @ 12:21
    Tony Groome
    0

    Going from Sql Server back to Sql Ce

    Hi All

    This may sound a bit odd, but I would like to go back from Sql Server to Ce. The problem is I need to take a project from one pc to another to complete it. It was set up on a machine with Sql Server, probably Express. The guy who did it has left and nobody is sure where his database is! The site is unpublished. Is there a way to do this? So far I have tried to change the <connectionStrings> in WebMatrix. I just copied from another project to:

     </appSettings>
      <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>
      

     

    But that didn't work. I got this...

    Server Error in '/' Application.

     

    Error running Reader:
    SQL Statement:
    SELECT id, domainName FROM umbracoDomains ORDER BY id

    Exception:
    System.Data.SqlServerCe.SqlCeException (0x80004005): The database file cannot be found. Check the path to the database. [ Data Source = E:\Chausser\App_Data\Umbraco.sdf ]
      at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
      at System.Data.SqlServerCe.SqlCeConnection.Open()
      at SQLCE4Umbraco.SqlCeContextGuardian.EnsureOpenBackgroundConnection(String connectionString)
      at SQLCE4Umbraco.SqlCeContextGuardian.Open(String connectionString)
      at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)

     

    Any ideas?

    Thanks

    Tony

  • Tony Groome 261 posts 804 karma points
    Dec 30, 2014 @ 13:32
    Tony Groome
    0

    Hi All

    I have just discovered that when I try to run the copied project it falls over as above, but when I attempt to log into the back office it just ignores the request 

    http://localhost:46893/umbraco#/login/false

    The login and password are correct.

    The plot thickens....

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 30, 2014 @ 14:17
    Dennis Aaen
    100

    Hi Tony,

    You should be able to going from Sql Server back to SqlCe database using the SQL Server Compact/SQLite Toolbox that you can find here: https://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1

    And here is a video where the co-founder of the tool are talking about what you can do with it, and one thing you can is to port a sql to a sqlce. http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-SQL-Server-Compact-Toolbox

    So I thinkt at you should be able to convert your sql to sqlce by using the tool

    Hope this helps,

    /Dennis

  • Tony Groome 261 posts 804 karma points
    Dec 30, 2014 @ 16:44
    Tony Groome
    0

    Hi Dennis

    Thanks a lot for that! We got sorted. Woo hoo!

    Now, its back to the Back Office!!

    Tony

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies