10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Use Data Entry Error HandlersDefining a 4GL procedure to be the data entry error handler for an executableobject requires setting the DataEntryErrorHandler attribute of the executableobject to the handle of the error-processing 4GL procedure. Set this attributefor the current frame using the following syntax:CurFrame.DataEntryErrorHandler =CurFrame.Scope.GetProcHandle (name = 'string');This syntax invokes the GetProcHandle method of the Scope system class toperform the following operations:• Get the handle for the named procedure in the named scope• Load the procedure's handle into the DataEntryErrorHandler attribute ofthe currently active executable objectTo set the DataEntryErrorHandler attribute for the current procedure ormethod, use the CurProcedure and CurMethod variables rather than CurFrame.To enable you to modify the error message, correct the value entered by theuser, and locate the frame containing the error-triggering field, data entryerror handlers are passed the following parameters:ErrorMessageData Type: Varchar(2000) not nullSpecifies either a default error message provided by OpenROAD or a userdefinederror message provided by a lower handler. It is passed byreference.ErrorFieldData Type: EntryFieldSpecifies the error-triggering field. The attributes ErrorField.TextValue andErrorField.StringValue contain the erroneous text that the user typed intothe triggering entry field.ErrorFrameData Type: FrameExecSpecifies the reference variable pointing to the frame containing the errortriggeringfieldThe first eight characters of the ErrorMessage parameter contain the errornumber of the triggering data entry error. Currently, the following are the dataentry errors:E_PW0007Indicates a mandatory field errorE_PW0008Indicates a format error310 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!