Retrieves the number of the last error that occurred.
Function LastError As Long
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.
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
If (Cf.LastError <> 0) Then
Cf.HideError = FALSE