Hi,
I have this code:
oArqUlt:GoTop()
Do While ! oArqUlt:RecLock()
MsgBeep()
MsgAlert("Record Lock!","Error")
Loop
Enddo
oArqUlt:Load()
oARQMAN:NUMERO := "LI"+Strzero(oArqUlt:PROXMFT,9,0)
oArqUlt:PROXMFT := oArqUlt:PROXMFT + 1
oArqUlt:Save()
oArqUlt:Commit()
oArqUlt:RecUnlock()
I use the ARQULT table to store the number of the next record to be inserted into another table, but it is happening that 2 people are using the same code, resulting in a duplicate record in the table that uses this field. What could be wrong?
Thanks in advance