VistaDB 5






VistaDB.DDA Namespace > IVistaDBTable Interface : CreateConstraint Method
Constraint's name to identify constraint instance
SQL expression to evaluate
User's description to constraint. Optional. May be null reference
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
CreateConstraint Method
Create constraint to check after insert, update or before delete operations
Syntax
'Declaration
 
Sub CreateConstraint( _
   ByVal name As System.String, _
   ByVal scriptExpression As System.String, _
   ByVal description As System.String, _
   ByVal insertion As System.Boolean, _
   ByVal update As System.Boolean, _
   ByVal delete As System.Boolean _
) 
'Usage
 
Dim instance As IVistaDBTable
Dim name As System.String
Dim scriptExpression As System.String
Dim description As System.String
Dim insertion As System.Boolean
Dim update As System.Boolean
Dim delete As System.Boolean
 
instance.CreateConstraint(name, scriptExpression, description, insertion, update, delete)
void CreateConstraint( 
   System.string name,
   System.string scriptExpression,
   System.string description,
   System.bool insertion,
   System.bool update,
   System.bool delete
)
procedure CreateConstraint( 
    name: System.String;
    scriptExpression: System.String;
    description: System.String;
    insertion: System.Boolean;
    update: System.Boolean;
    delete: System.Boolean
); 
function CreateConstraint( 
   name : System.String,
   scriptExpression : System.String,
   description : System.String,
   insertion : System.boolean,
   update : System.boolean,
   delete : System.boolean
);
void CreateConstraint( 
   System.string* name,
   System.string* scriptExpression,
   System.string* description,
   System.bool insertion,
   System.bool update,
   System.bool delete
) 
void CreateConstraint( 
   System.String^ name,
   System.String^ scriptExpression,
   System.String^ description,
   System.bool insertion,
   System.bool update,
   System.bool delete
) 

Parameters

name
Constraint's name to identify constraint instance
scriptExpression
SQL expression to evaluate
description
User's description to constraint. Optional. May be null reference
insertion
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