AERROR()
Contents
Purpose
Function to populate an array with information about the most recent error
Syntax
AERROR([<array>])
See Also
AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), AELEMENT(), AFIELDS(), AFILES(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, DIR, ERROR(), ERRNO(), FDATE(), FILE(), GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, MESSAGE(), PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER, SET ERRORLOGGING, SYSFILES
Description
The AERROR() function populates an array with information about the most recent error. The array name, <array>, can optionally be specified, otherwise the array is named _aerror. AERROR() function will load the following information about the error into the array:
| Column | Type | Contents |
|---|---|---|
| 1 | Numeric | Error number |
| 2 | Character | Error message |
| 3 | Logical | .F. |
| 4 | Logical | .F. |
| 5 | Logical | .F. |
| 6 | Logical | .F. |
| 7 | Logical | .F. |
Example
? sqlstringconnect("invalid") -1 ? aerror() Array (refcnt=1) ( [1] = 73 [2] = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [3] = False [4] = False [5] = False [6] = False [7] = False ) display memory Memory Variables: ------------------------ console variables: _AERROR Fixed array (refcnt 1) _AERROR [1] Numeric [ 10] 73 (73.000000000) _AERROR [2] Character[ 92] '[Microsoft][ODBC Driver Manager] Data source name not found and no default drive' _AERROR [3] Logical [ 1] .F. _AERROR [4] Logical [ 1] .F. _AERROR [5] Logical [ 1] .F. _AERROR [6] Logical [ 1] .F. _AERROR [7] Logical [ 1] .F.