Description
Write a record to the specified table, leaving any locks on the record set. If the table is on an MVBFS volume, then host (back-end) record locking will be maintained; if the table is on an OpenInsight volume, then the record will just be written without changing the LOCK on the record.
Syntax
Rslt = RTI_WRITEU(table, id, record)
Parameters
The function has the following parameters:
Parameters | Description |
---|---|
Table | Either the name of a table to write to, or a handle to an already-opened table |
Id | The record key to write |
Recordvar | The record to write |
Returns
RTI_WRITEU returns a flag indicating success (STATUS_WRITE_OK$) or error (FS_WRITE_ERR$). These flags are defined in the RTI_READU_EQUATES insert (which includes the actual FSERRORS_100 insert).
See also
Example
SUBROUTINE WRITEU_EXAMPLE(VOID) $insert RTI_READU_EQUATES RSLT = RTI_READU(“BOOKS”, “100”, BOOKREC) BEGIN CASE CASE RSLT = STATUS_READ_OK$ * Record has been read successfully – now change it BOOKREC<20> = DATE() WRSLT = RTI_WRITEU(“BOOKS”, 100, BOOKREC) * Record has been updated but the lock is still set CASE RSLT = FS_REC_DNE$ * No such record found CASE RSLT = FS_SYS_LOCK_ERR$ * Record locked CASE RSLT = FS_READ_ERR$ * Other (fatal) error END CASE RETURN 0