Name: revOpenDatabases

Type: function

Syntax: revOpenDatabases()

Summary: <return|Returns> a list of open <database|databases>.

Synonyms: revdb_connections

Introduced: 1.1

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: disk,network

Example:
revOpenDatabases()

Example:
repeat for each item thisConnection in revOpenDatabases()

Example:
if revOpenDatabases is empty then cleanUp

Returns: The <revOpenDatabases> <function> <return|returns> a list of database IDs separated by commas.

Description:
Use the <revOpenDatabases> <function> to find out how many <database|databases> are open, or in a <repeat> <loop> to access all the open <database|databases> in turn.

The database ID returned by the <revOpenDatabases> <function> is the same as the number <return|returned> by the <revOpenDatabase> <function> when the <database> was opened.

If the operation is not successful, the <revOpenDatabases> <function> <return|returns> an error message that begins with the <string> "revdberr".

>*Important:*  The <revOpenDatabases> <command> is part of the <Database library>. To ensure that the <command> 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 revOpenDatabases synonym was added in version 2.0.

References: string (keyword), Database library (library), Revolution custom library (library), revDatabaseConnectResult (function), revOpenDatabase (function), revDatabaseType (function), Standalone Application Settings (glossary), database (glossary), loop (glossary), return (glossary), standalone application (glossary), command (glossary), function (control_st), repeat (control_st)

Tags: database
