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).
Using autoincrement on the index will cause duplicates
So i have two solutions:
The index field have a max value of:
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
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 ?
I must use DWORD as the index.