Thanks for your response, I can't understand why the failure so I have started putting in set order before seek just in case.
>ALL shouldn't have any effect on REPLACE WHILE. The difference between REPLACE WHEN and SCAN WHEN ... REPLACE is that REPLACE WHEN places lock on the table and REPLACE locks only current record.
>
>>I am not chnaing the id so in that case is ALL okay. I have this situation where generally this code works and in around 2% of the cases this fails, why I can understand. Does the same apply to SCAN
>>
>>I have never used UPDATE is it more reliable and fast, that was the reason for SEEK and REPLACE WHILE.
>>