locked
Does MSSync Services support Server-generated Ids? RRS feed

  • Question

  • Hi,

    Some of our data has server-generated Id columns. Is there any support for this in MSSync Services?

    e.g.
    Can MSSync services be told that the primary key for locally inserted rows is only temporary, and should not be inserted into the server-tables. Instead, the server will provide a new primary key for the client row after a synchronisation?

    Or is there some way for Sync Services to call the server prior to creating new rows to request an Id?

    Thanks,
    Mark.

    • Moved by Max Wang_1983 Friday, April 22, 2011 10:29 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, July 10, 2007 3:40 PM

Answers

  • Hi Mark,

     

    Server generated IDs are similar in many ways to auto-increment columns which I wrote about in my blog, here.

     

    Thanks

    Tuesday, July 10, 2007 6:39 PM

All replies

  • Hi Mark,

     

    Server generated IDs are similar in many ways to auto-increment columns which I wrote about in my blog, here.

     

    Thanks

    Tuesday, July 10, 2007 6:39 PM
  • Thanks for that. Good blog posting.

    In my case, I am actually using MSSync to link into a legacy client-side application that supports OLEDB to allow access to it's data. It needs to be the controller of the ID for new objects.

    I think we can get around the problem for now by creating the object directly (similarly to your blog suggestion), and retrieving the Id to use in the SQLce tables.

    In my case, it may be useful to have had the facility to query the datasource to allow it to provide an acceptable ID for me to use, but I can see this may be an unusual case.

    Thanks,
    Mark.
    Wednesday, July 11, 2007 1:36 PM