Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to upgrade a SQL Server Mobile database? [Solved]

How to upgrade a SQL Server Mobile database? [Solved]

Scheduled Pinned Locked Moved Database
databasevisual-studiocsharpc++sql-server
3 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TMattC
    wrote on last edited by
    #1

    Hi! Im kinda out of my dept here. Im upgrading an old C++/CLI project to Visual Studio 2013, so I have a SQL Server Mobile database file (.sdf) that needs to be upgraded to current version (whatever that is). Im not sure what version it has now, but VS says I need to upgrade it with SqlCeEngine.Upgrade(). I´ve got SQL Server Pro 2014 installed on my computer, and when I tried to install Sql Server Compact 4.0 it said I have a later version installed already. Im totally lost here. Could someone please push me in the right direction.

    T 2 Replies Last reply
    0
    • T TMattC

      Hi! Im kinda out of my dept here. Im upgrading an old C++/CLI project to Visual Studio 2013, so I have a SQL Server Mobile database file (.sdf) that needs to be upgraded to current version (whatever that is). Im not sure what version it has now, but VS says I need to upgrade it with SqlCeEngine.Upgrade(). I´ve got SQL Server Pro 2014 installed on my computer, and when I tried to install Sql Server Compact 4.0 it said I have a later version installed already. Im totally lost here. Could someone please push me in the right direction.

      T Offline
      T Offline
      TMattC
      wrote on last edited by
      #2

      In the end I solved it myself. It turned out the SQL Server Mobile file (.sdf) was created by version 3.5, while I tried to access it from Visual Studio 2013 with version 4.0. I solved it entering References under project properties. Then removing the reference to System.Data.SqlServerCe.dll (v4.0). After that I added a new reference to the System.Data.SqlServerCe.dll v3.5. I had to Browse my hard drive in order to find it. Problem solved.

      1 Reply Last reply
      0
      • T TMattC

        Hi! Im kinda out of my dept here. Im upgrading an old C++/CLI project to Visual Studio 2013, so I have a SQL Server Mobile database file (.sdf) that needs to be upgraded to current version (whatever that is). Im not sure what version it has now, but VS says I need to upgrade it with SqlCeEngine.Upgrade(). I´ve got SQL Server Pro 2014 installed on my computer, and when I tried to install Sql Server Compact 4.0 it said I have a later version installed already. Im totally lost here. Could someone please push me in the right direction.

        T Offline
        T Offline
        TMattC
        wrote on last edited by
        #3

        A small note after some further research: There is an add-in to Visual Studio called "SQL Server Compact/SQLite Toolbox" which give you som really nice tools for working with those databases from within Visual Studio. One of those features is to update the SQL Server CE database from v.3.5 to v.4.0.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups