Use FORM_SUCCESS to test the outcome of a built-in to determine further processing within any trigger. To get the correct results, you must perform the test immediately after the action executes.
That is, another action should not occur prior to the test.
"Another action" includes both built-ins and PL/SQL assignment statements.
If another action occurs, FORM_SUCCESS may not reflect the status of the built-in you are testing, but of the other, more recently executed action.
FORM_SUCCESS should not be used to test whether a COMMIT_FORM or POST Built-in has succeeded. Because COMMIT_FORM may cause many other triggers to fire, when you evaluate FORM_SUCCESS it may not reflect the status of COMMIT_FORM but of some other, more recently executed built-in.
A more accurate technique is to check that the SYSTEM.FORM_STATUS variable is set to QUERY after the operation is done.
On Microsoft Windows NT, when using HOST to execute a 16-bit application, the FORM_SUCCESS built-in will return TRUE whether the application succeeds or fails.
This is a Microsoft a Win32 issue. 32-bit applications and OS commands will correctly return TRUE if executed sucessfully and FALSE if failed. Invalid commands will return FALSE.
On Windows 95 platforms the FORM_SUCCESS Built-in will always return TRUE for HOST commands which fail. This includes calls to command.com or OS functions, any 16-bit DOS or GUI application, or an invalid command. FORM_SUCCESS will return TRUE for 32-bit applications executed sucessfully and FALSE if failed.
Partager