Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Ids
Message
From
01/04/1997 19:46:24
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
01/04/1997 16:50:26
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00026435
Message ID:
00026488
Views:
30
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform