Search code examples
.netado.netsql-server-cesyncfx

SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection


I am trying to follow Microsoft's instructions for doing a synchronization between a Microsoft SQL Server database (the server) and a Microsoft SQL Server Compact Edition database (the client).

  • The synchronization is N-tier (server and client communicate via a Windows Communication Foundation web service)
  • The synchronization is batched
  • The synchronization is bidirectional

I have provisioned both databases and have successfully downloaded data from the server to the client. When I try to upload data from the client to the server, I get an exception on the server:

SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection

This exception occurs once all of the sync batch files have been received from the client and Sync Framework starts applying those batches to the server. What could be causing this problem?


Solution

  • The solution is to grant VIEW DEFINITION and EXEC permissions on the table type of the @changeTable parameter.