c# - Uploading to SQL Server using Microsoft Sync from SQL CE database -
i've searched around having difficulty finding information on uploading changes sql ce database sql server.
i have synchronize function setup like:
public int synchronize() { list<syncoperationstatistics> syncstats = new list<syncoperationstatistics>(); // set direction of sync session 'download' because ony server can modified. syncorchestrator syncorchestrator = new syncorchestrator(); syncorchestrator.direction = syncdirectionorder.upload; foreach (var scopename in scopenames) { syncorchestrator.localprovider = new sqlcesyncprovider(scopename, db_sqlceconnection); syncorchestrator.remoteprovider = new sqlsyncprovider(scopename, db_sqlconnection); // subscribe errors occur when applying changes client ((sqlcesyncprovider)syncorchestrator.localprovider).applychangefailed += new eventhandler<dbapplychangefailedeventargs>(program_applychangefailed); ((sqlsyncprovider)syncorchestrator.remoteprovider).applychangefailed += new eventhandler<dbapplychangefailedeventargs>(remote_applychangefield); syncoperationstatistics syncstat = null; // execute synchronization process syncstat = syncorchestrator.synchronize(); // add synchronization statistics list syncstats.add(syncstat); } return syncstats.count; } with syncorchestrator.direction set upload, receive error of
cannot enumerate changes @ relationalsyncprovider table 'table1'. i able sync changes server ce database quite easily. going in other direction seems challenge.
Comments
Post a Comment