db_msg

Returns last database error message.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

string db_msg()

Description

If the last database operation was a successful insert, db_msg() returns the unique row identification for the new row if the database supports this response. Otherwise the function returns the last database error message.

Example

Logs database error messages to a file.
if (g.error_code == err_DB) log("dbms.err",db_msg());