none
Filtered Scopes and SelectChanges stored procedures RRS feed

  • Question

  • I have some parent-child relationships built into my database.  I also have filtered scopes based on a date field in the parent table.  When the user changes the date on the parent table, I want the child records to be returned when the client syncs.

    I have looked at other forum posts, and it seems a good way to implement this is to change the SelectChanges stored procedure on the child table to also compare the timestamp with the parent table.  I have implemented this.

    I turn on profiling on the server and do a sync from my client.  After the sync completes, the child record does not appear in the client database.

    Re-running the SelectChanges command I have captured from profiling, it does indeed return the record I want.  However, for whatever reason, the record does not show up in the client database.

    Any help to solve this problem would be greatly appreciated.

    Tuesday, June 18, 2013 6:32 PM

Answers

  • have you checked the ApplyChangeFailed event for anything?

    a row getting selected by the SelectChanges sp doesnt guarantee that it's going to be applied. it's just what it is, a detected change.

    Wednesday, June 19, 2013 12:22 AM
    Moderator

All replies

  • have you checked the ApplyChangeFailed event for anything?

    a row getting selected by the SelectChanges sp doesnt guarantee that it's going to be applied. it's just what it is, a detected change.

    Wednesday, June 19, 2013 12:22 AM
    Moderator
  • Closing up this old thread.  

    I did indeed check the ApplyChangeFailed event on the client side, and it wasn't able to write the record because a dependent foreign-key was not present in a related table.  

    This has been solved.  Thank you JuneT.

    Wednesday, October 23, 2013 7:48 PM