locked
HELP Please! Trying to use a sync agent - can't update local database RRS feed

  • Question

  • I am trying to build an application that has a local database and synchronizes with a centralized server regularly using the sync agent.
     
    I am fairly new to VS.Net and followed some of the samples and demos I was able to find onlne.  This is what I did:
     
    1. I created the database tables/relation in SQL Server express
    2. Started a new vb.net windows form project and added a local database cache specifying the server database and created a new client .sdf database
    3. Specified the sync direction to be bi-directional in the sync agent's OnInitialize method
    4. Created a datagrid by dragging one of the tables and tried to make changes to the data and saving using the code below and perform the synchronization.
     

        Me.Validate()

        Me.CustomersBindingSource.EndEdit()

        Me.TableAdapterManager.UpdateAll(Me.NorthwindDataSet)

     

    Now after updating records on the datagrid view and saving using the above code, when I open the local database tables, the changes that I make do not get saved.  The only thing I see is what is being synchronized from the server on the first round synchronization.  I want my application to update the local db and upload the changes whenever synchronization is done.  Am I missing something here?

     

    Also sometimes, my local database tables will be empty and I have to syncronize again to pull data from the server - shouldn't my local database stay the same until I change it and or synchronize?

     

    Any help that would get me past this issue would be greatly appreciated.

    • Moved by Max Wang_1983 Friday, April 22, 2011 7:54 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, May 1, 2008 11:26 PM

Answers

  • I did find out that the changes that I make to the local database were saved in another copy of the db in the \debug folder.

    Friday, May 2, 2008 2:30 PM