>>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