0
votes

I using Synchronization via WCF, my server and client are SQL Server EXPRESS 2008, (for development I using one instance of sql express)

I added sync filters template on server and create all my scopes based on this template. Tables structure on client and server side the same. When I start my application first all system tables, SP, triggers created on both side well.

But during synchronization (localProvider is server, RemoteProvider client)

 SyncOrchestrator orchestrator = new SyncOrchestrator
            {
                LocalProvider = localProvider,
                RemoteProvider = remoteProvider,
                Direction = SyncDirectionOrder.Download
            };

process I got next exception:

{"Failed to execute the command 'BulkInsertCommand' for table 'MySyncTable'; the transaction was rolled back. Ensure that the command syntax is correct."}

Inner Exception:

{"Conversion failed when converting the nvarchar value 'after sync' to data type bit.\r\nThe data for table-valued parameter \"@changeTable\" doesn't conform to the table type of the parameter.\r\nThe statement has been terminated."}

As for me it is looks like I have different tables structure, I look at BulkInsertCommand on server side and don't find nothing wrong,

Could it be related to filters scope or why sync generate thise error ?

Thanks.

2

2 Answers

1
votes

have you previously provisioned a different scope on the same sets of table?

did you clean up the Sync Framework generated objects manually rather than using the deprovisioning API?

if you did for either of the above, chances are it's using an outdated UDT.

if you dont have any other scopes defined on the database try DeprovisionStore to deprovision the entire database and remove all Sync Framwork created objects.

if you have other scopes, deprovision all scopes associated with the problem table using DeprovisionScope.

0
votes

I cleared sync information with DeprovisionStore and recreate scope and now all working.... thanks.