I have come up with 2 methods for installing a local database with my WPF application:
- Create a backup of the DB, then restore in the installer via SMO
- Script the database install and execute it via ADO or osql.exe
I’m required to provide an upgrade path, rather than just dropping the currently installed databases.
Are there other methods that are more flexible? Are there better/easier to manage tools?
Have you looked at Sql Server Compact 3.5 SP1? The install is just a question of copying the database files and referencing the assemblies in your project.
http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx
What do you mean exactly with an upgrade path? Future newer versions of the same application and database?