Difference between revisions of "DBUSED()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to check whether a database is open. | Function to check whether a database is open. | ||
− | |||
==Syntax== | ==Syntax== | ||
DBUSED(<expC>) | DBUSED(<expC>) | ||
− | |||
==See Also== | ==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()]] | [[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== | ==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. | 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 | |
− | + | ? dbused("hr") | |
.T. | .T. | ||
− | + | CLOSE DATABASES | |
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 12:27, 10 February 2012
Contents
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