Name: revDatabaseConnectResult

Type: function

Syntax: revDatabaseConnectResult(<databaseID>)

Summary: <return|Returns> the most recent error message for a <database>.

Synonyms: revdb_connectionerr

Introduced: 1.1

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: disk,network

Example:
revDatabaseConnectResult(line x of the openDatabases)

Example:
if revDatabaseConnectResult(myReservations) is empty then exit repeat

Parameters:
databaseID: The number returned by the revOpenDatabase function when the database was opened.

Returns: The <revDatabaseConnectResult> <function> <return|returns> a <string>.

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

If there were no errors on the specified database connection, the <revDatabaseConnectResult> <function> <return|returns> empty. Otherwise the <revDatabaseConnectResult> function returns the database specific error message for the most recent database operation that failed.

>*Important:*  The <revDatabaseConnectResult> <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 revDatabaseConnectResult synonym was added in version 2.0.

References: function (control_st), string (keyword), revCloseDatabase (command), revQueryResult (function), revOpenDatabase (function), revOpenDatabases (function), Standalone Application Settings (glossary), database (glossary), standalone application (glossary), return (glossary), Database library (library), Revolution custom library (library)

Tags: database
