I'm getting TABLEUPDATE() failures when two or more users simultaneously attempt to enter, then save, separate new client records in my application while running in Terminal Services sessions on the same server. This does not occur in this app when it is run in a traditional client/server mode on separate work stations pointed at common data on a file server.
I use either APPEND BLANK or INSERT INTO to add the new record, with code like this to generate a new integer surrogate key:
DO WHILE !FLOCK()
WAIT WINDOW 'Adding Record' TIMEOUT 1
ENDDO
SET ORDER TO (PK)
lnTempID = n
DO WHILE SEEK(lnTempID) OR KEYMATCH(lnTempID,TAGNO(PK),tcTableName)
lnTempID = lnTempID + 1
ENDDO
UNLOCK
Is there something inherent in Terminal Services operation that would cause this scheme to fail?
Ray Roper