User Tools

Site Tools


validatefield_validate_a_field_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== ValidateField (validate a field) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ValidateField( field id ), VIRTUAL, PROC

blk2blue.jpg

ValidateField Validates the current record buffer value of the specified field and returns a success or failure indicator.
field id A numeric constant, variable, EQUATE, or expression that identifies the field to validate. The field is ientified by its position in the FILE declaration. A value of one (1) indicates the first field, two (2) indicates the second field, etc.

The ValidateField method initiates the validation of the field's buffer and requests that any errors be reported to the user. Level:Benign is returned if no errors occur.

Implementation:

The ValidateField method calls the ValidateFieldServer method to validate the field's contents.

Return Data Type:     BYTE

Example:

MyFile   FILE,DRIVER('TOPSPEED'),THREAD

Record    RECORD,PRE()

TGroup     GROUP                    !field id 1

Name        STRING(20)              !field id 2

Name2       STRING(20)              !field id 3

FirstName   STRING(10),OVER(Name2)  !field id 4

          END

Another    STRING(10)               !field id 5

         END

        END

CODE

!program code

Access:MyFile.ValidateField(4)     !validate FirstName

See Also:     ValidateFields, ValidateFieldServer

validatefield_validate_a_field_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1