October 1, 2008 at 10:22 am
[p]We are using ClickOnce to deploy a Windows application to many client machines and to allow for updates. The application is created in Visual Studio 2008 using C#, Windows Forms, and a Sql Server Compact Edition 3.5 database file. The database file is separate from the application, stored in the user's C:\SomeDirectory folder upon deployment, and not updated via ClickOnce with every new version of the application. The user will add / remove data in the database file via the user interface of the application. Occasionally we may need to make schema changes to the database and deploy those to the client machines (e.g. add a new empty table and likely primary & foreign key constraints). Obviously we can't just write over the database file already on the client machine, or the user would lose all of his data. What we need conceptually is some sort of merge of the new schema changes to the existing client database file.[/p]
[p]First off, is anything like that possible? And if so, how best can we accomplish it?[/p]
[p]Second, is there a better / easier way to solve this problem in general? This has to be a somewhat common scenario.[/p]
[p]We've looked at using the ADO.Net DataSet methods to WriteXmlSchema(), ReadXmlSchema(), and Merge(). However, if I understand correctly how those methods could be employed we would first need to load the entire database into a DataSet. I've read in other places that doing that is generally not a good idea. What is the alternative? And if there is no alternative, how best can the entire database be read into a DataSet?[/p]
Thanks,
Kyle
October 1, 2008 at 11:07 am
[p]I found the following information in a blog from Steve Lasker. Is this the consensus that scripts should be generated and executed via the SqlCe API?[/p]
Kyle
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply