>I have this very irritating problem: it is in a very simple application which does very standard things:
>
>A record with some numerical totals has to be updated and/or created if it doesn't exist already.
>
>I search the table according to a tag, if not found, append blank, rlock the record and replace key fields with data and replace a field with a numerical total.
>
>Sometimes, not much but often, the record is created but the key fields are not replaced by the values. No other application is using the table, but the rlock doesn't seem to work. Most bizar is the index tag: the record is not updated but if you open the table according to the tag the record is in the order (place) where it would be if the fields were updated ok. What is happening?
>
>
>If somebody nows the reason, i'll be gratefull.
>
>
>Ivo
Ivo,
Without the actual code I wouldn't be able to say what's going on (just think what if rlock() fails ?). But I would suggest using "insert into" instead of append blank + replace. It's faster and no code in between.
Cetin