开发者

Local Data Cache SyncTable Schema not copied, clientSyncProvider _ CreatingSchema does not fire

I am using the VS2008 Local Data Cache tool to synchronize a SqlServer 2008 Db with a local SQL CE 3.5. At the server I have a table with a PK with datatype uniqueIdentifier and defaultvalue newID(). Upon initial synchronization through the Local Data Cache the DB it creates does not copy the default value for this column (as described here: http://msdn.microsoft.com/en-us/library/bb726037%28v=SQL.105%29.aspx, See "..the following constraints are not copied to the client: FOREIGN KEY constraints, UNIQUE constraints, and DEFAULT constraints...")

I have found a similar question here: MS Sync Framework: Table schema not copied to local db.

But w开发者_Python百科hen I tried to implement the solution, I found that the CreatingSchema event for the clientSyncProvider of my Local Data Cache partial class does not fire.

How come? How do I change the schema for a local Data Cache?

Thanks for any ideas you can come up with.


what is the TableCreation option settings for your client database? if the SDF and the initial schema has been created by the Local Database Cache wizard, then subsequent syncs will no longer create the schema not unless you specify via the TableCreation option that the existing tables be dropped and replaced with a new schema.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜