m.gnError = 0
on error m.gnError = error()
BEGIN TRANSACTION
....
DO WHILE .NOT. FLOCK() && You decide how many cikles to wait
ENDDO
INSERT .....
TableUpdate(.t., "Stafile") && Just in case :o)
if m.gnError = 0
end transaction
else
rollback
endifAgainst Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.