ONUPDATE Table Constraint

From Recital Documentation Wiki
Revision as of 11:04, 22 December 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Table constraint activated when an attempt is made to update a record in the table


Syntax

ONUPDATE <procedure>


See Also

ALTER TABLE, CONSTRAINTS, CREATE TABLE


Description

A constraint is used to define rules that help to provide data integrity. TABLE constraints apply to table-based operations. You must have ALTER privilege on the table. The table will be locked for EXCLUSIVE use during the operation.

The ONUPDATE table constraint is activated when an attempt is made to update a record in the table. The <procedure> specified must be a character expression evaluating to a procedure name. If no file extension is included, '.prg' is assumed. The specified procedure is run before the operation to update the record is executed and must return True (.T.) or the update operation is cancelled.


Example

ALTER TABLE customer;
  modify ONUPDATE "p_update"


Products

Recital, Recital Server