DBUSED()

From Lianjapedia
Revision as of 07:59, 7 December 2012 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

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.).

Databases can be opened using the SQL USE command, with SQL set to MYSQL, or using the SQL OPEN DATABASE command.

Example

OPEN DATABASE hr EXCLUSIVE
? dbused("hr")
.T.
CLOSE DATABASES