locked
Never see .sdf Database Updated RRS feed

  • Question

  • I have carefully followed the exercises in the Microsoft Virtual Lab "Learn How to Build OCAs." The one modification that I have made is that in the Configure Data Synchronization tool or wizard I specify Data to Download: Entire table each time in the Client Configuration for each table. I do this because I don't want any changes made to the server database. I am never seeing the local cache (.sdf) updated. I have tried working with the local cache table in the application's Form but I still don't see any updates to the SQLCE database. All I see is that the local DataSet is synchronizing with the server database, but I don't need Sync Services for ADO.NET to do that.

     

    Also, in each of these examples the application is dependent on the connection to the server database - if the server is not available, the applications throw an exception. How can these be occasionally connected applications?

     

    Finally, I have followed some of the older examples in the Sync Services for ADO.NET section of the Microsoft Sync Framework Developer Center, but these are really too complex if you wanted to synchronize more than a handful of tables in a database. I need to apply this concept to a database with over 300 tables and sync roughly 150 tables.

     

    Please provide some feedback.

     

    Thanks

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:01 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, December 14, 2007 9:10 PM

Answers

  • Hi Peter,

     

    I'm not sure if you still follow-up on this issue or not but I found something that might useful for you. I guessed when you say "I am never seeing the local cache (.sdf) updated.", you mean you right click on the table name and select 'Show Table Data' under your.sdf in the Server Exploerer or similar way. This is incorrect connection because it point to your original .sdf file (that it automatic create when you use sync designer). When you run the application, it copy the .sdf file to bin\debug or bin\release and work with this copy file. So if you need to see if the updated records saved or not, you might need to see the .sdf in bin folder instead.

     

    Hope this help and sorry for my poor English,

     

    Chatchai

    Monday, January 7, 2008 8:25 AM

All replies

  • Hi Peter,

     

    Check out the samples I've on my web site: www.syncguru.com

    Once you feel comfortable with the samples, you can then duplicate it to your own database. I did not run into this error.

     

    The VS200 ships with sync designer that can automate this process for you for 300 tables. One idea to consider here is to divide you tables into groups. This should give you better performance.

     

    The fact that the app throws exception if the connection to the server is not available is just an incomplete sample. The main feature of the occasionally connected application is that you can do your against local database and sync whenever the connection is available.

     

    Thanks

     

    Tuesday, December 18, 2007 7:46 PM
  •  

    Hi Rafik,

     

    I look at your samples and they are great. By the way, it is too much job to coding these so I come across to VS 2008 that has Sync Designer by follow this cast: http://channel9vip.orcsweb.com/Showpost.aspx?postid=347021. Everything work very well but I have a same problem with Peter that my local database (.sdf) never updated. When I click the sync button (that the cast show how to create it) the changed data update to server database but if I look at the data in .sdf it is not update. Also, if I make change to the data (by edit the value on the form) and click save, the data in .sdf is not save.

     

    Do you have any suggestion how to solve this issue. I need the user to edit data and save locally then sync to the server.

     

    Thanks,

     

    Chatchai

    Saturday, January 5, 2008 5:08 AM
  • Hi Peter,

     

    I'm not sure if you still follow-up on this issue or not but I found something that might useful for you. I guessed when you say "I am never seeing the local cache (.sdf) updated.", you mean you right click on the table name and select 'Show Table Data' under your.sdf in the Server Exploerer or similar way. This is incorrect connection because it point to your original .sdf file (that it automatic create when you use sync designer). When you run the application, it copy the .sdf file to bin\debug or bin\release and work with this copy file. So if you need to see if the updated records saved or not, you might need to see the .sdf in bin folder instead.

     

    Hope this help and sorry for my poor English,

     

    Chatchai

    Monday, January 7, 2008 8:25 AM
  • Hi Chatchai,

     

    Your English is good enough to explain what I had wrong.  You were absolutely right, I was looking at the .sdf file created in the Project directory and not at the copied .sdf in the Debug directory.  I changed the relative path to the .sdf and turned off copying and it works like a charm!  I really don't want to have a copied SQL CE database in the Project, one is enough.

     

    Many, many Thanks - this has been a problem for me for about a month.

     

    Peter

     

     

    Tuesday, January 15, 2008 7:39 PM
  • Hi Peter,

     

    I'm glad to hear that my post useful for you. I had the same issue with you and when I found the cause, I think I have to share to who that have the same issue.

     

    This is mt first time that my post mark as Answer, thank you

     

    Chatchai

    Wednesday, January 16, 2008 1:51 AM