>You still haven't supported your claim.
>
>something like: (except that we need to see the same value being returned)
>
> 1 machineA append blank
> 2 machineB append blank
> 3 machineA function MkKey( tcFld )
> 4 machineB function MkKey( tcFld )
> 5 machineA llDone = .f.
> 6 machineB llDone = .f.
> 7 machineA do while !llDone
> 8 machineB do while !llDone
> 9 machineA select nCtr ; from KeyCtr ; where kKeyCtr = tcFld ; into array laCtr && A gets 1
>10 machineB select nCtr ; from KeyCtr ; where kKeyCtr = tcFld ; into array laCtr && B gets 1
>13 machineA update KeyCtr ; set nCtr = laCtr[1] + 1 ; where kKeyCtr = tcFld and nCtr = laCtr[1] && counter gets bumped to 2
>14 machineB update KeyCtr ; set nCtr = laCtr[1] + 1 ; where kKeyCtr = tcFld and nCtr = laCtr[1] && nothing happens because there is not record that matches the where clause
>15 machineA if _tally = 0 && 1 record was processed, so _tally = 1
>16 machineB if _tally = 0 && 0 records processed, so _tally = 0
>17 machineA llDone = .t. && Done
>18 machineB loop && Try again
>19 machineA return laCtr[1] && returns 1
>20 machineB do while !llDone
>21 machineB select nCtr ; from KeyCtr ; where kKeyCtr = tcFld ; into array laCtr && Gets 2
>23 machineB update KeyCtr ; set nCtr = laCtr[1] + 1 ; where kKeyCtr = tcFld and nCtr = laCtr[1] && Gets bumped
>24 machineB if _tally = 0 && _tally = 1
>25 machineB llDone = .t.
>26 machineB return laCtr[1] && Returns 2
>
>
>>>Then same response.
>>>>
>>>>Yes. Same issues. I pointed it out in my previous posting, message #
293578.
>>
>>
>>Yes, same response. The code will not work in multi-user environment.
You didn't get it. The problem is not with the UPDATE, but the original INSERT. There is nothing to stop two people from inserting the same record.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer