VistaDB 6
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


In This Topic
    CreateConstraint Method
    In This Topic
    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
    )

    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