DBServerSyncProvider SelectClientdCommand和同步服务Ado.Net
我想使用DBServerSyncProvider的selectclientdcommand,但我不想向我的数据库中添加更多的表,我想专门将客户机id定义为long,如下所示:DBServerSyncProvider SelectClientdCommand和同步服务Ado.Net,ado.net,synchronization,service,Ado.net,Synchronization,Service,我想使用DBServerSyncProvider的selectclientdcommand,但我不想向我的数据库中添加更多的表,我想专门将客户机id定义为long,如下所示: long ClientIdentifier=540; SqlCommand ClientIdComm = new SqlCommand(); ClientIdComm.CommandType = CommandType.Text; ClientIdComm.CommandText = " declare @sync_o
long ClientIdentifier=540;
SqlCommand ClientIdComm = new SqlCommand();
ClientIdComm.CommandType = CommandType.Text;
ClientIdComm.CommandText = " declare @sync_originator_id bigint "+
" set @sync_originator_id= " +ClientIdentifier +
" select @sync_originator_id ";
serverSyncProvider.SelectClientIdCommand = ClientIdComm;
这将引发无法将客户端ID映射到原始发件人ID的错误。请确保命令DbServerSyncProvider.selectclientdcommand正确。
我做错了什么?
tks好的,发现@Sync\u originator\u id接受Int,但不接受BigInt, 是否仍要传递bigint作为客户端标识符