locked
hello,may i ask two question? RRS feed

  • Question

  • hello sir/madam

       may i ask two question about sync framewrok?

    #1 does the example like this is one-way synchronization?

    // Connection to SQL Server SqlConnection serverConn = new SqlConnection(@"Data Source=.\SQLEXPRESS; Initial Catalog=SyncDB; Trusted_Connection=Yes"); // Connection to SQL client SqlConnection clientConn = new SqlConnection(@"Data Source=.\SQLEXPRESS; Initial Catalog=SyncClientDB; Trusted_Connection=Yes"); // Perform Synchronization between SQL Server and the SQL client. SyncOrchestrator syncOrchestrator = new SyncOrchestrator(); // Create provider for SQL Server SqlSyncProvider serverProvider = new SqlSyncProvider("product", serverConn); // Set the command timeout and maximum transaction size for the SQL Azure provider. SqlSyncProvider clientProvider = new SqlSyncProvider("product", clientConn); // Set Local provider of SyncOrchestrator to the server provider syncOrchestrator.LocalProvider = serverProvider; // Set Remote provider of SyncOrchestrator to the client provider syncOrchestrator.RemoteProvider = clientProvider; // Set the direction of SyncOrchestrator session to Upload and Download syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload; // Create SyncOperations Statistics Object SyncOperationStatistics syncStats = syncOrchestrator.Synchronize(); // Display the Statistics Console.WriteLine("Start Time: " + syncStats.SyncStartTime); Console.WriteLine("Total Changes Uploaded: " + syncStats.UploadChangesTotal); Console.WriteLine("Total Changes Downloaded: " + syncStats.DownloadChangesTotal); Console.WriteLine("Complete Time: " + syncStats.SyncEndTime); // Shut down database connections. serverConn.Close(); serverConn.Dispose(); clientConn.Close(); clientConn.Dispose();

    #2 i write these code in a web service in VS 2008,the sync framework version is 2.1,however it occured the following exception:

    “Microsoft.Synchronization.SyncException: Retrieving the COM class factory

    for component with CLSID {A7B3B4EE-925C-4D6C-B007-A4A6A0B09143} failed

    due to the following error: 80040154. ---> 

    System.Runtime.InteropServices.COMException:

    Retrieving the COM class factory for component

    with CLSID {A7B3B4EE-925C-4D6C-B007-A4A6A0B09143}

    failed due to the following error: 80040154.”

    does anybody knew what's wrong?

    regards

    Ken


    • Edited by ken yup Wednesday, July 8, 2015 5:41 AM
    Wednesday, July 8, 2015 5:40 AM

Answers

  • I get this error when Sync framework SDK 2.1 is not installed in target server. Or it is installed, but not for correct architecture (ie x86 in 64bit environment).

    Donatas Vyzas

    • Marked as answer by ken yup Saturday, February 13, 2016 8:19 AM
    Monday, July 27, 2015 6:54 PM