Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Windows Forms application.
The database is a MSSQL Express.
The offline cache should be no SQL Compact.

My question:
Is it possible to use locally and on a SQL Server Express, to syncronize this automatically.

My application requires DocumentID's and CustomerID's. These must be consecutive and may only be issued by the main database.

I work with a GUID as PK.

I despair of, please help me
Posted

No..there is no automatic way of handling it.
If you do not want to use compact db, you can use Dictionary object or a Hashtable to store this data locally but it can not get updated on it's own. You need to re-start the application to load the fresh data.

I believe you do not have much data as you are using SQL express as db. You can use XML file as well to keep the ID's and keep them updated using a separate windows service. It all depends how efficient you want it to be.

Hope it helps..
 
Share this answer
 
Hello,
Thank you for your quick response.
I've done it now I can sync to a SyncOrchestrator the main database and the locale.
However, there are still some open questions.

How do I initiate a sync from only one record? I create a new article and want to save it now. If I start a synchronization, which takes a long time.
How do I get with changes to the main database? What should I do with all clients will be informed after an update? Can I put something on the DB as a database trigger to insert the records each time distributed?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900