locked
SyncSession questions RRS feed

  • Question

  • Hi, i'm new to this SSCE but i'm interested of what it can do, so i did some readings and experimenting with different database, but i was hit by a problem and would like someone who's kind enough to explain to me.

    do all syncsession's strings (SyncClientIdHash,SyncNewReceivedAnchor, etc) only supports lower case strings? Cos i'm currently experimenting it on Borland Interbase 2007 Dev edition, and i'm getting errors like "Unable to set session parameters in DbServerSyncProvider. Cannot obtain the value for command parameter : SYNC_LAST RECEIVED_ANCHOR." (when i used uppercase like SyncSession.SyncLastReceivedAnchor.TOUPPER() ) or "Cannot find column sync_last_received_anchor" (when i didn't use uppercase). Are there any work around for this?

    • Moved by Max Wang_1983 Friday, April 22, 2011 10:59 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, April 16, 2007 7:03 AM

Answers

  • Hi Aleksey,

     

    The client provider stores an anchor for each table to address the scenario you just pointed out.

    One important thing you to note here is that tables with relationships (pk-fk) should synchronize together as a group this is to avoid constraint failures.

     

    Thanks,

    Rafik

    Wednesday, April 18, 2007 7:41 PM

All replies


  • Hmm, Interesting... I expect it to fail. The system expects the same names as you see them as public properties of SyncSession interface.
    I am curious to why do you call ToUpper() on the SyncSession.SyncLastReceivedAnchor?

     

    Thanks

    Tuesday, April 17, 2007 1:18 AM
  • well.. it's because of interbase's sql format, by default every word is converted to uppercase when passed to the server, for example
     " select * from table1 where update_timestamp <> : sync_last_received_anchor"
    will be read as
     "SELECT * FROM TABLE1 WHERE UPDATE_TIMESTAMP <> : SYNC_LAST_RECEIVED_ANCHOR",
     that's y i used ToUpper() on syncSession.synclastreceivedanchor because interbase is case sensitive, and it treats : SYNC_LAST_RECEIVED_ANCHOR and : sync_last_received_anchor as different parameters. That was 1st attempt before i realized that syncsession can only recognize lowercase strings .So i force interbase to read a column name as lowercase, i need to use double quotes for both side, the sync service can't recognise SyncLastReceivedAnchor with double quotes added to it.

    @"SELECT * FROM TABLE1 WHERE UPDATE_TIMESTAMP <> :""sync_last_received_anchor"""

     incInsOrdersCmd.Parameters.Add(string.Format (@":""{0}""", SyncSession.SyncLastReceivedAnchor), BDbType .TimeStamp ); (if i don put quotes, it's automatically converted to uppercase again")
    So I'm still stuck with this .

    Thanks for the quick reply, very much appreciated.
    Tuesday, April 17, 2007 1:47 AM

  • Good point. Thanks for clarifying this.
    I think we need to handle this in the runtime. I cannot think of a workaround. I will take care of it.


    Thanks

    Tuesday, April 17, 2007 3:27 PM
  • Hi,

     

    Is SyncLastReceivedAnchor set on per table or per database basis?

    In ohter words if I synchronize one table now, and then another table later will I miss the changes made to the second table

    before I synced the first table?

     

    Thanks

    Wednesday, April 18, 2007 7:33 PM
  • Hi Aleksey,

     

    The client provider stores an anchor for each table to address the scenario you just pointed out.

    One important thing you to note here is that tables with relationships (pk-fk) should synchronize together as a group this is to avoid constraint failures.

     

    Thanks,

    Rafik

    Wednesday, April 18, 2007 7:41 PM
  • Great!

     

    Thanks for fast response.

    Wednesday, April 18, 2007 7:43 PM