简体   繁体   English

在客户端和服务器同步方案中实现SqliteClientSyncProvider?

[英]Implement SqliteClientSyncProvider in Client & Server Synchronization Scenario?

I want to implement a Client(SQLite) & Server(SQL Server) Synchronization application using MS Sync Framework and SqliteClientSyncProvider ( http://sourceforge.net/projects/sqliteclientsyn/ ) 我想使用MS Sync Framework和SqliteClientSyncProvider( http://sourceforge.net/projects/sqliteclientsyn/ )来实现Client(SQLite)和Server(SQL Server)同步应用程序

syncOrchestrator = new SyncOrchestrator();
syncOrchestrator.LocalProvider = new SqliteClientSyncProvider(clientSqlConn);
syncOrchestrator.RemoteProvider = new SqlSyncProvider("filtered_customer", serverConn, null, "Sync");
syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload;

syncStats = syncOrchestrator.Synchronize();

After Synchronize() execution a got an InvalidCastExcpetion : 执行Synchronize()之后,得到一个InvalidCastExcpetion:

InvalidCastExcpetion : Microsoft.Synchronisation.KnowledgeSyncProvider

Any advice ? 有什么建议吗?

you have to use the SyncAgent instead of the SyncOrchestrator. 您必须使用SyncAgent而不是SyncOrchestrator。 The SqlLiteClientSyncProvider is an older anchor-based offline provider that doesn't use the newer knowledge-based peer-to-peer type of sync provider. SqlLiteClientSyncProvider是一个较旧的基于锚的脱机提供程序,它不使用更新的基于知识的对等类型的同步提供程序。

in you example above, you can't mix and match providers as well. 在上面的示例中,您也无法混合和匹配提供程序。 so if you're using SQL Server for the remote provider part, you must use the older DBServerSyncProvider as well. 因此,如果将SQL Server用于远程提供程序部分,则还必须使用较旧的DBServerSyncProvider。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何实现此.NET客户端和PHP服务器同步方案? - How to implement this .NET client and PHP server synchronization scenario? 服务器到客户端回到服务器同步 - Server to Client back to server synchronization 客户端数据库与服务器数据库与已过滤数据的同步 - Synchronization of client database with server database with filtered data 在真实场景中实施身份服务器身份验证 - Implement identity server authentication in real world scenario 用于文件(客户端)和SQL Server数据库(服务器)同步的Microsoft Sync Framework - Microsoft Sync Framework for File (Client) and SQL Server Database (Server) synchronization 具有两个SQL Server的MS Sync Framework客户端服务器方案 - MS Sync Framework Client Server Scenario with two SQL Server 是否可以在服务器端的客户端/服务器场景中使用 SqlDataAdapter? - Is it possible to use SqlDataAdapter in a Client/Server scenario on the server side? 客户端-服务器聊天中令牌传递同步的C#问题 - C# problem with token passing synchronization in client-server chat WPF客户端和服务器最佳做法之间的WCF同步 - WCF synchronization between WPF client and server best practices 如何在客户端-服务器方案中停止多个线程? C# - How to stop multiple threads in a Client-Server scenario? C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM