2016-10-31 8 views
2

일부 스파이크 작업으로 두 CE 데이터베이스를 동기화하려고합니다. 여기에서 튜토리얼을 따르고 있습니다 - https://msdn.microsoft.com/en-us/library/ff928606(v=sql.110).aspx. 나는 다음과 같은 오류 얻을 두 개의 데이터베이스 동기화하려고 할 때동기화 할 때 호환되지 않는 데이터베이스 버전

: 이것은 내 코드

SqlCeConnection clientConn = new SqlCeConnection(@"DataSource='Local.sdf'"); 
SqlCeConnection serverConn = new SqlCeConnection(@"DataSource='Server.sdf'"); 

SyncOrchestrator syncOrchestrator = new SyncOrchestrator(); 

syncOrchestrator.LocalProvider = new SqlCeSyncProvider("ProductsScope", clientConn); 
syncOrchestrator.RemoteProvider = new SqlCeSyncProvider("ProductsScope", serverConn); 

syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload; 

syncOrchestrator.Synchronize(); 

여기이 질문에서입니다

Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = C:\Projects\DataBase Spike\DataBase Spike\Local.sdf ]

-SQL Server CE Incompatible Database Version을 내 System.Data.SqlServerCe.dll는 것을 보장했다 버전 4.0이고 사용하고 있습니다 SqlCeConnection

+0

다른 데이터베이스는 SQL CE 3.5에서 생성되었습니다. 두 DB 모두 SQL CE의 동일한 버전으로 만들어야합니다. – raidensan

+0

@raidensan 저는 비주얼 스튜디오를 통해 두 데이터베이스를 다시 만들었지 만 여전히 문제가 있습니다. – Ralt

답변

0

SQL CE 4는 동기화 Fx에서 지원되지 않습니다. 하지만 일부 어셈블리 바인딩 리디렉션으로 도망 갈 수 있습니다. 체크 아웃 this post