Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Ids
Message
De
01/04/1997 19:46:24
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
01/04/1997 16:50:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00026435
Message ID:
00026488
Vues:
28
>>Does anyone have a technique on creating unique ids for tables (as
>primary
>>keys) besides the VFP sample that uses NewId()??
>>
>>Our problem is our users want to connect to the data (via drive mapping),
>
>>sync their data, disconnect, modify information, reconnect and re-sync
>>(sending their updates ..and receiving anything new that has changed
>since
>>they were off-line).
>>
>>Could off-line views be an option(???).
>
>offlines views seem like a very good option for this
>note that to keep the primary keys unique either
>give a range for each machine or add a machine ID as part of the PK
>(depending on the data type of your PK)
>so each record created independently will be unique
>
>
>Arnon
I have a client with the same needs. What we came up with is a function that essentially...

when ready to add new record
=flock()
do while .t.
id_field=local_id+dtos(date())+sys(3)
if not(seek(newid))
insert into dbffile from memvar
unlock
exit
endif
enddo
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform