I'm still addapting to the concept of local/remote views. The multi-user app that I am develpoing in VFP 8, will eventually be used on a WAN. I am trying to prevent errors from 2 people accessing the same IdControlNumber at the same time. I have a situation where TABLEUPDATE() on a base table with an autoincemented field, will not meet my needs. I want to set up a table of id/key numbers. Is this a correct technique?
Select IdTableView && record buffering ON
REPLACE IdTableView.Number WITH IdTableView.Number + 1
nCount = 0
&& update record, do not force overwrite overwrite
DO WHILE !TABLEUPDATE(0,.F.) .and. nCount< 100
REQUERY() &&get the new value that someone else put in
REPLACE IdTableView.Number WITH IdTableView.Number + 1
nCount = nCount+1
ENDDO
Or does a failed TABLEUPDATE(0,.F.) generate an error that must be handled with an ON ERROR routine?
Thanks in Advance
Jim Rumbaugh
Select IdTableView && record buffering ON
REPLACE IdTableView.Number WITH IdTableView.Number + 1
nCount = 0
&& update record, do not force overwrite overwrite
DO WHILE !TABLEUPDATE(0,.F.) .and. nCount< 100
REQUERY() &&get the new value that someone else put in
REPLACE IdTableView.Number WITH IdTableView.Number + 1
nCount = nCount+1
ENDDO
Or does a failed TABLEUPDATE(0,.F.) generate an error that must be handled with an ON ERROR routine?
Thanks in Advance
Jim Rumbaugh