User Tools

Site Tools


validatefieldserver_validate_field_contents_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== ValidateFieldServer(validate field contents) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ValidateFieldServer(field id, handle errors), PROC, VIRTUAL, PROTECTED

blk2blue.jpg

ValidateFieldServer 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 identified by its position in the FILE declaration. A value of one (1) indicates the first field, two (2) indicates the second field, etc.
handle errors An integer constant, variable, EQUATE, or expression that indicates an error has occurred when validating the field id.

The ValidateFieldServer method validates the specified field in the current record buffer and returns a success or failure indicator. If an error occurs when the field's buffer is validated an error message (Msg:FieldNotInFile) is indicated to the user.

Implementation:

The ValidateFieldServer method simply returns a zero (0). By convention a return value of zero (0) indicates a valid field and any other value indicates a problem. The ABC Templates derive a file-specific ValidateFieldServer method for each file that implements Validity Checks specified in the Clarion data dictionary.

The ValidateField and TryValidateField methods both call ValidateFieldServer to do their work, any global editing functions added by deriving the FileManager Class should be placed in the ValidateFieldServer method to assure that they will be executed by both the Validate and TryValidate methods.

Return Data Type:     BYTE

See Also:     FileManager.TryValidateField, FileManager.ValidateField

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