SQL Server CE .sdf merge

纵然是瞬间 提交于 2019-12-11 23:05:41

问题


My application is running on Windows CE 6.0, and it uses a SQL Server CE .sdf file to store user data. The application is running on an industrial device, which is not connected to internet. The only way to update the software is to plug a USB stick inside.

As expected, the first release 1.0 of the application needs to update to 1.1 now, the database schema as well.

How could I merge the .sdf version 1.0 which is on the device with the latest 1.1 database schema that will be available through the File System (USB stick) of the device.

I added a picture below to help understanding my question.

I am aware about RDA and Merge Replication possibility, but my application is not connecting to a central server through http. Before learning how to use them I would like an expert advice.


回答1:


You will need to programatically apply the changes required for the schema to change from 1.0 to 1.1. You can do this by using ALTER TABLE/CREATE TABLE statements, combined with inspecting the current schema by querying the INFORMATION_SCHEMA views



来源:https://stackoverflow.com/questions/33632787/sql-server-ce-sdf-merge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!