I have a Btrieve app. running on one location.
Every database files have one unique DWORD index.
To day I use autoincrement on this field.
Now I want two separate locations to have the same
app. and the databases will be synchronized (merged).
regularly.
Using autoincrement on the index will cause duplicates
when merged.
So i have two solutions:
The index field have a max value of:
4294967295 (DWORD)
So if I separate each location and give them unique values
from 1 to 428.
So location one have a range from
001 0000001 to 001 9999999
location two:
002 0000001 to 002 9999999
...and so on.
But how can I store the unique numbers ( 0000001 to 9999999 )
I can use get less or equal of 0019999999 and then get highest
number used on location one. But this will take one extra request
on the database.
Is there any other good solutions ?
PS!
I must use DWORD as the index.