views:

148

answers:

1

Hi, I want to use the DBServerSyncProvider's SelectClientIdCommand but i don't wan't to add more tables to my data base, i want to specifically define the clients id (as a long), something like this:

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;

this will throw "Failed to map client ID to originator ID. Make sure the command DbServerSyncProvider.SelectClientIdCommand is correct."
what am I doing wrong? tks

A: 

ok, found out that @Sync_originator_id accepts Int, but not BigInt, is there anyway to pass a bigint as the client identifier?

Bee gud

related questions