J
jonathan.dudley
Dear all,
I have a PC and handheld application that among other things, create
customer orders. It is possible to create customer orders on either the
PC or the handheld. There may be many handhelds fulfilling orders. The
orders from the PC can be transferred onto the handheld to be carried
out and orders, having been fulfilled on a handheld, are synchronised
back to the PC (using csv files, not merge replication etc).
Each order has an ID that must be unique, as I need to be able to match
orders on the PC and a handheld and check their last modified date-time
in order to decide which version should be kept during a synchronise
operation.
So I was wondering, if I am creating orders on the PC and on multiple
handhelds, how can I be sure that the same ID is not used on more than
one device, creating a conflict at a later stage during a
synchronisation? Should I have an extra field in the database,
CreatedBy, for example, which contains the ID of the device on which
the order was created, and have the primary key as a combination of
this field and the order id?
What is the best way to solve this problem?
Thanking you all,
Best regards,
Jonathan
I have a PC and handheld application that among other things, create
customer orders. It is possible to create customer orders on either the
PC or the handheld. There may be many handhelds fulfilling orders. The
orders from the PC can be transferred onto the handheld to be carried
out and orders, having been fulfilled on a handheld, are synchronised
back to the PC (using csv files, not merge replication etc).
Each order has an ID that must be unique, as I need to be able to match
orders on the PC and a handheld and check their last modified date-time
in order to decide which version should be kept during a synchronise
operation.
So I was wondering, if I am creating orders on the PC and on multiple
handhelds, how can I be sure that the same ID is not used on more than
one device, creating a conflict at a later stage during a
synchronisation? Should I have an extra field in the database,
CreatedBy, for example, which contains the ID of the device on which
the order was created, and have the primary key as a combination of
this field and the order id?
What is the best way to solve this problem?
Thanking you all,
Best regards,
Jonathan