of_dberror

This function records database errors to the event log. There are two versions of this function. One version has no arguments and requires a call to PopulateError just before the call to of_dberror. The information collected by PopulateError in the error object is used to format the error message that is added to the Event log. The first argument is unused, the second argument should be a fairly short description of the purpose of the SQL statement.

You can use either form of this function, it is a matter of your coding style and if the messages in the event log meet your needs.

Arguments:

apo_object - The calling object

as_message - A message describing the sql statement

Return:

True = Database error occurred, False = No error

Usage (No arguments):

UPDATE MYTABLE SET NAME = 'SMITH' WHERE ID = :ll_id;

PopulateError(0, "Trying to change the name")

If sqlca.of_dberror() Then

  Return 0

End If

Usage (With arguments):

UPDATE MYTABLE SET NAME = 'SMITH' WHERE ID = :ll_id;

If sqlca.of_dberror(this, "Trying to change the name") Then

  Return 0

End If