VistaDB 5






Constraint name
Expression to evaluate during constraint check operations.
User's description to constraint
When it is set to the true, the constraint will be checked after insert row operation
When it is set to the true, the constraint will be checked after update row operation
When it is set to the true, the constraint will be checked after before delete operation. If v-expression is being evaluated to the false, the row will not be deleted
DefineConstraint Method
Set constraint to check after insert, update or before delete operations.
Syntax
'Declaration
 
Sub DefineConstraint( _
   ByVal name As System.String, _
   ByVal scriptExpression As System.String, _
   ByVal description As System.String, _
   ByVal insert As System.Boolean, _
   ByVal update As System.Boolean, _
   ByVal delete As System.Boolean _
) 
'Usage
 
Dim instance As IVistaDBTableSchema
Dim name As System.String
Dim scriptExpression As System.String
Dim description As System.String
Dim insert As System.Boolean
Dim update As System.Boolean
Dim delete As System.Boolean
 
instance.DefineConstraint(name, scriptExpression, description, insert, update, delete)
void DefineConstraint( 
   System.string name,
   System.string scriptExpression,
   System.string description,
   System.bool insert,
   System.bool update,
   System.bool delete
)
procedure DefineConstraint( 
    name: System.String;
    scriptExpression: System.String;
    description: System.String;
    insert: System.Boolean;
    update: System.Boolean;
    delete: System.Boolean
); 
function DefineConstraint( 
   name : System.String,
   scriptExpression : System.String,
   description : System.String,
   insert : System.boolean,
   update : System.boolean,
   delete : System.boolean
);
void DefineConstraint( 
   System.string* name,
   System.string* scriptExpression,
   System.string* description,
   System.bool insert,
   System.bool update,
   System.bool delete
) 
void DefineConstraint( 
   System.String^ name,
   System.String^ scriptExpression,
   System.String^ description,
   System.bool insert,
   System.bool update,
   System.bool delete
) 

Parameters

name
Constraint name
scriptExpression
Expression to evaluate during constraint check operations.
description
User's description to constraint
insert
When it is set to the true, the constraint will be checked after insert row operation
update
When it is set to the true, the constraint will be checked after update row operation
delete
When it is set to the true, the constraint will be checked after before delete operation. If v-expression is being evaluated to the false, the row will not be deleted
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also