Difference between revisions of "DBUSED()"

From Lianjapedia
Jump to: navigation, search
Line 10: Line 10:
 
==Description==
 
==Description==
 
The DBUSED() function is used to check whether the database whose name is specified in <expC> is open.  If the database is open, DBUSED() returns True (.T.), if not it returns False (.F.).
 
The DBUSED() function is used to check whether the database whose name is specified in <expC> is open.  If the database is open, DBUSED() returns True (.T.), if not it returns False (.F.).
 
Databases can be opened using the SQL USE command, with SQL set to MYSQL, or using the SQL OPEN DATABASE command.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
OPEN DATABASE hr EXCLUSIVE
+
open database hr exclusive
 
? dbused("hr")
 
? dbused("hr")
 
.T.
 
.T.
CLOSE DATABASES
+
close databases
 
</code>
 
</code>
  
Line 25: Line 23:
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Databases]]
 
[[Category:Databases]]
[[Category:Database Functions]]
+
[[Category:Cursor Functions]]

Revision as of 06:50, 4 February 2013

Purpose

Function to check whether a database is open.

Syntax

DBUSED(<expC>)

See Also

ADATABASES(), ADIR(), ALIAS(), CLOSE DATABASES, COPY DATABASE, DATABASE(), DBF(), DISPLAY SCHEMAS, DISPLAY STATUS, GETENV(), LIST SCHEMAS, LIST STATUS, OPEN DATABASE, SET FILECASE, SET SQL, USE, USED()

Description

The DBUSED() function is used to check whether the database whose name is specified in <expC> is open. If the database is open, DBUSED() returns True (.T.), if not it returns False (.F.).

Example

open database hr exclusive
? dbused("hr")
.T.
close databases