Name: revOpenDatabases

Synonyms: revdb_connections

Type: function

Syntax: revOpenDatabases()

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

Associations: database library

Introduced: 1.1

OS: mac, windows, linux, ios, android

Platforms: desktop, server, 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 
> <LiveCode custom library|custom library> when you create your 
> <standalone application|standalone>. In the Inclusions pane of the 
> <Standalone Application Settings> window, make sure both the 
> "Database" library checkbox and those of the database drivers you are 
> using are checked.

Changes:
The revOpenDatabases synonym was added in version 2.0.

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

Tags: database

