c# - Microsoft sync The default schema does not exist -


"postprint" itemprop = "text">

I use Microsoft Sync framework to sync data between remote and local data base, but I face error "Default Schema does not exist" while applying the provision to remote servers

SqlSyncProvider sqlProviderLocal = new SqlSyncProvider (scopam, sqlConnLocal); SqlSyncProvider sqlProviderRemote = new SqlSyncProvider (scopeName, sqlConnRemote);

  SqlSyncScopeProvisioning scopeProvisionLocal = new SqlSyncScopeProvisioning (sqlConnLocal); Scope projection local Objectscama = ".dido"; If (! ScopeProvisionLocal.ScopeExists (ScopeName)) {DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription (scopeName); Foreign items (different items in table) {scopeDesc.Tables.Add (SqlSyncDescriptionBuilder.GetDescriptionForTable (item, sqlConnLocal)); } ScopeProvisionLocal.PopulateFromScopeDescription (scopeDesc); ScopeProvisionLocal.SetCreateTableDefault (DbSyncCreationOption.Skip); ScopeProvisionLocal.Apply (); } SqlSyncScopeProvisioning scopeProvisionRemote = New SqlSyncScopeProvisioning (sqlConnRemote); ScopeProvisionRemote.ObjectSchema = ".dbo"; If {DbSyncScopeDescription scopeDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope (scopeName, sqlConnLocal) (scopeProvisionRemote.ScopeExists (scopeName)!); ScopeProvisionRemote.PopulateFromScopeDescription (scopeDesc); ScopeProvisionRemote.Apply (); } Agent.LocalProvider = sqlProviderLocal; Agent.RemoteProvider = sqlProviderRemote; SyncOperationStatistics stats = agent.Synchronize (); Results = ClearAccras (); SqlConnLocal.Close (); SqlConnRemote.Close ();  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -