SQLERR() Function - Get Last SQL Error

Syntax

SQLERR(sqlchan{,ERR=lineref})

Description

The SQLERR() function returns the text for the most recent error returned by the SQL command being executed. This text is not normally generated by PRO/5 and may not be compatible with different SQL databases.

If an SQLOPEN fails, use SQLERR(0) to return the error code of the failed open.

Examples

32010 LET RET$=SQLFETCH(SQLCHAN,ERR=32020); RETURN
32020 LET ERR$=SQLERR(SQLCHAN); GOSUB ERRMES
32030 RET$=""; RETURN

See Also

Functions - Alphabetical Listing