开发者

Can you select which column to sync with Sync Framework

开发者 https://www.devze.com 2022-12-30 21:58 出处:网络
I notice that with MS Sync, going through the wizard to create the WCF service that will do the sync, you can only choose which table to sync.

I notice that with MS Sync, going through the wizard to create the WCF service that will do the sync, you can only choose which table to sync.

Is it possible to only sync a开发者_Python百科 few columns of the table and not the entire table? It will also create the local sdf file with the whole table structure. I only need a few columns of the table to be displayed in my mobile device.


You can achieve this by writing code. You can use the DbSyncTableDescription

DbSyncTableDescription tableDescription = SqlSyncDescriptionBuilder.GetDescriptionForTable(tableName, Collection<Columns>, server Connection)

The second parameter is the collection of Column Names you want to include in Sync.

Hope that helps


The Sync Framework is a customizable and extensible framework hence it can surly be done. But you probably have to write some code - I am not aware that the database synchronization provider included in the framework supports synchronizing only a subset of the columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消