How to upgrade a SQL Server Mobile database? [Solved]
-
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.
-
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.
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.
-
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.
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.