Name: revQueryResult

Type: function

Syntax: revQueryResult(<recordSetID>)

Summary: <return|Returns> the most recent error message associated with a <record set (database cursor)(glossary)>.

Synonyms: revdb_cursorerr

Introduced: 1.1

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: disk,network

Example:
revQueryResult(field "Current Set")
if revQueryResult(thisCursor) is not empty then beep 2

Parameters:
recordSetID: The number returned by the revQueryDatabase function when the record set was created.

Returns: The <revQueryResult> <function> returns a <string>.

Description:
Use the <revQueryResult> <function> to check for successful completion of <SQL> commands.

If there were no errors associated with the specified record set, the <revQueryResult> <function> returns empty. If there was an error, then a database-specific string will be returned describing the error.

>*Important:*  The <revQueryResult> <function> is part of the <Database library>. To ensure that the <function> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section of the General screen of the <Standalone Application Settings> window, make sure the "Database Support" checkbox is checked and the database drivers you are using are selected in the list of database drivers.

Changes:
The revQueryResult synonym was added in version 2.0.

References: function (control_st), string (keyword), revCommitDatabase (command), revdb_commit (function), revDatabaseConnectResult (function), Standalone Application Settings (glossary), standalone application (glossary), record set (database cursor) (glossary), return (glossary), SQL (glossary), Database library (library), Revolution custom library (library)

Tags: database
