Hi!
The easiest way is to work with BufferMode = 5 (optimistic table buffering).
The main advantage is: There is only one command in your code, which needs to lock something - the TABLEUPDATE() command. All other commands (INSERT, APPEND, REPLACE, DELETE etc.) don't need locks or exclusive access if you're using optimistic table buffering because all those operations are working in the buffers and not against the shared real life DBF.
Have a look at the help file using the topic "buffering"!
SeBaFlu