fgl_gethelp()

fgl_gethelp( ) mirrors the functionality of the ERR_GET function.  It takes an integer expression as its argument and returns a character string containing the text of the 4GL or SQL error message for the specified argument.

Description: fgl_gethelp()%20function

fgl_gethelp( ) is most useful when you are developing a program.  The message that it returns is probably not helpful to the user of your 4GL application.  The argument of fgl_gethelp( ) is typically the value of the status variable, which is affected by both SQL and 4GL errors, or else a member of the global SQLCA.SQLCODE record.  

 

In this example user is prompted to enter an error code and presses OK.

The default error code value in the example is -1110.

The corresponding error text is displayed in the winmessage error window if found.

MAIN

  DEFINE

    current_error_status integer,

    str STRING

  CALL fgl_winprompt(10, 10, "Enter error number:", "-1110",  5, 2) returning current_error_status

  LET str = "Error ", current_error_status

  CALL fgl_winmessage(str clipped, fgl_gethelp(current_error_status), "error")

END MAIN

 

The value of status can be assigned by a wide range of different statement variables.  In order to avoid the status being changed unexpectedly it is always advisable to copy it as soon as possible so that the value you want to maintain does not get changed.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.