Available in:
Apps (win)
Apps (char)
Reportwriter
RPC
Standalone PL
X
X
X
X
X
int lock_row(table-name,row-id,update[,original]) ident table-name expr row-id int update list original
table-name | specifies the database table. | ||||||
row-id | specifies the row in the database table. | ||||||
update | If update is true, then the item's original value
(previously saved) is compared to the current value in the database.
If these values do not match, the following status is returned:
| ||||||
original | (optional) must be a list in which the current database values for columns without the NOUPDATE attribute are placed. The lock_row() function uses these values internally to compare to the shadow values. |
. for (i=list_rows(DL);i;i-,list_next(DL)) { lock = lock_row(EMP,list_curr(DL,0),false); if (lock != 0) g.msg = "Could not acquire lock."; else exec_sql("DELETE FROM emp WHERE rowid = " ^^ list_curr(DL,0)); } . }