>> set reprocess to automatic >> public _gaerror(1,7) >> on error aerror(m._gaerror) >> use table1 shared >> cursorsetprop('buffering',1) && no buffering >> local i >> for i = 1 to 1 >> m._gaerror = 0 >> if rlock('0','table1') ; >> then >> insert into table1 ; >> (field1) values (m.lnValue) >> unlock record 0 in table1 >> else >> if m._gaerror(1,1)=108 ; && If the file is locked by another user try again >> then >> i = i - 1 && keep trying till succed >> endif >> endif >> next >> use in table1 >>>>
>> set multilocks on >> set reprocess to 1 && try locking once >> sys(3051,500) && try at every 500 miliseconds >> sys(3052,1,.t.) && index locking honors reprocess setting >> sys(3052,1,.t.) && memo locking honors reprocess setting >> public _gaerror(1,7) >> on error aerror(m._gaerror) >> use table1 shared >> cursorsetprop('buffering',3) && optimistic row buffering >> insert into table1 ; >> (field1) values (m.lnValue) >> local i >> for i = 1 to 1 >> m._gaerror = 0 >> if not tableupdate(2,.t.,'table1') and ; >> m._gaerror(1,1)=108 ; && If the file is locked by another user try again >> then >> i = i - 1 && keep trying till succed >> endif >> next >> use in table1 >>>>
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature