Where in the heck does the sync scope knowledge come from? There seems to be magic involved ... RRS feed

  • Question

  • I previously posted last week to see if anyone had any ideas as to why I was getting an error with a custom provider for a SQL Server peer-to-peer sync application stating that an expected parameter: @scope_sync_knowledge was not supplied. So far, there have been zero replies. The error message I am getting is:

    Failed to execute provider command: 'UpdateScopeInfoCommand'; the transaction was rolled back. Ensure that the command syntax is correct.. ---> System.Data.SqlClient.SqlException: The parameterized query '(@scope_sync_knowledge varbinary(max), @scope_tombstone_cleanup_' expects the parameter '@scope_sync_knowledge', which was not supplied.


    What really conerns me is that I have created the SIMPLEST ADO peer-to-peer sync imaginable here ... and I can't even get it working .  I have created an app with custom DbSyncProvides and  DbSyncAdaptes with all of the necessary SQLCommand objects. Most of the code has come straight from one of the sample apps. I set up my providers like:

                DbSyncProvider provider = new DbSyncProvider();
                provider.Connection = new SqlConnection( DBConnString );
                provider.ScopeName = strScopeName;

                BindProviderCommands( provider );

                DbSyncAdapter adapter = new DbSyncAdapter( "Customer" );
                adapter.RowIdColumns.Add( "CustomerId" );

                BindSourceAdapterCommands( adapter );
                BindDestinationAdapterCommands( adapter );

                provider.SyncAdapters.Add( adapter );


    The building of the adapters and the SQLCommands is very straightforward. And I just keep getting this same error message. What MAGIC is the simple provider doing that I am missing in my custom provider application?? It is obviously doing SOMETHING because when I set up the simple provider demo app, everything works fine and the sync scope knowledge magically gets created. What do I have to do in my custom provider app to get the knowledge created?


    I just can't figure this out, and it seems like it should be a very simple thing.






    Monday, June 7, 2010 2:00 PM