Question

We have recently moved an existing Clickonce app development project from Visual Studio 2005 to VS 2010. Due to an upgrade issue with Visual Studio 2010, we've had to upgrade its SQL CE database from v3.1 to v3.5.

To avoid data migration headaches, we have been copying the user's previous database into their new installation folder each time a Clickonce update is published. If there are any DB changes, we script them into the app's IsFirstRun event handler.

But now, since we've changed the database version and the deployed SQL CE .dll files, it means that all our existing clients will end up with the wrong database version.

We have a rather large user base, and we face problems if we require all existing users to export their data, completely uninstall, then reinstall the new version.

QUESTION: Is there a way to upgrade the existing database in-place programmatically?

THANKS

No correct solution

OTHER TIPS

Here are two articles you might find useful. The first one is how to include the SQLCE dll's WITH your deployment rather than deploying it as a prerequisite; this gives you total control over what version you are running.

http://robindotnet.wordpress.com/2010/02/28/how-to-deploy-the-sqlserver-compact-edition-software-locally/

The second article is about how to keep your data safe from ClickOnce updates.

http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/

Sure, use the SqlCeEngine upgrade API, even supports in place upgrades: http://erikej.blogspot.com/2010/08/how-to-upgrade-version-3x-database-file.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top