Difference between revisions of "ONOPEN Table Constraint"

From Lianjapedia
Jump to: navigation, search
m (1 revision: SQL)
 
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Table constraint activated when the table is opened
 
Table constraint activated when the table is opened
 
  
 
==Syntax==
 
==Syntax==
 
ONOPEN <procedure>
 
ONOPEN <procedure>
 
  
 
==See Also==
 
==See Also==
 
[[ALTER TABLE]], [[SQL Constraints|CONSTRAINTS]], [[CREATE TABLE]]
 
[[ALTER TABLE]], [[SQL Constraints|CONSTRAINTS]], [[CREATE TABLE]]
 
  
 
==Description==
 
==Description==
Line 15: Line 12:
  
 
The ONOPEN table constraint is activated when the table is opened.  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 after the operation to open the table is executed.
 
The ONOPEN table constraint is activated when the table is opened.  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 after the operation to open the table is executed.
 
  
 
==Example==
 
==Example==
Line 24: Line 20:
  
  
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL]]
 
[[Category:SQL]]

Latest revision as of 10:02, 7 December 2012

Purpose

Table constraint activated when the table is opened

Syntax

ONOPEN <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 ONOPEN table constraint is activated when the table is opened. 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 after the operation to open the table is executed.

Example

ALTER TABLE customer;
  modify ONOPEN "p_open"