Method
Retrieves the number of the last error that occurred.
Category
Errors
Syntax
Function LastError As Long
Comments
If the number that is returned is not 0 (zero), an error has
occurred. For most uses, this is sufficient knowledge. If you need
to know the exact error that occurred, the file dberror.txt that
comes with C/FRONT contains a complete list of these codes.
LastError resets the error, that is after calling LastError, a repeated call will return 0.
Example
LastError is most often used when HideError has been set to TRUE. LastError
can be used to test if an error did occur, as follows:
Cf.HideError = TRUE
Cf.AnyFunction
If (Cf.LastError <> 0) Then
Call ErrorHandler
EndIf
Cf.HideError = FALSE