[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| USED |
+---------------------------------+
USED([<expN> | <expC>])
-----------------------------------
Returns true if a database is open in a specified work area.
Return value - Logical
-----------------------------------
USED() returns a logical true value (.T.) if a database is open in a
specified work area. If a database isn't open in the specified work
area, USED() returns a logical false (.F.).
<expN> | <expC>
If you don't specify a work area or alias, the currently selected work
area is checked for an open database. To test for an open database in
another work area, include the work area number <expN>, or the database
alias <expC>.
If you specify an alias, USED() returns true if a database with the
specified alias is open in one of the FoxPro work areas.
+---------------------------------+
| Example |
+---------------------------------+
CLOSE ALL
SELECT A
USE customer
SELECT B
USE items
SELECT C
USE salesrep
? USED(1)
? USED('B')
? USED(4)
* The following example checks to see whether the INVOICE database is
* in use. If it is, its workarea is selected; otherwise the database is
* opened in the first available area.
IF USED('INVOICE')
SELECT invoice
ELSE
SELECT 0
USE invoice
ENDIF
-----------------------------------
See Also: ALIAS(), SELECT
-----------------------------------
See Also:
ALIAS()
SELECT
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson