$LastErrCode

The error code generated by the last command that returned an error code.

Syntax

$lasterrcode

Return Value

A number (1 to 9999). Can be reset by an application program.

Description

The reason for the failure of the most recently executed command that returned an error code other than 0 (success)

At the beginning of each application session, $LastErrCode is set to $Null. Its value then changes only if a command returns an error code, or the application program explicitly assigns it a new value.

Explanations for many error codes are contained in the ErrorHelp entity set, which you can access from your database application using the DESCERR or EXPLERR utility program.

 

Related Topics