Difference between revisions of "USED()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
==Class==
 
Table Basics
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to determine if a table is open
 
Function to determine if a table is open
Line 15: Line 11:
  
 
==Description==
 
==Description==
The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty.  <expN> is a numeric expression giving a workarea number: 1-DB_MAXWKA in which to check for an open table.  <expC>is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table.  The alias can be specified in the USE command.  If not specified, the table basename is used.
+
The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty.  The <expN> is a numeric expression giving a workarea number in which to check for an open table.  The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table.  The alias can be specified in the USE command.  If not specified, the table basename is used.
  
  
Line 36: Line 32:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Table Basics]]
 
[[Category:Table Basics]]
 
[[Category:Table Basics Functions]]
 
[[Category:Table Basics Functions]]

Latest revision as of 16:30, 15 December 2009

Purpose

Function to determine if a table is open


Syntax

USED([<expN> | <expC>])


See Also

ALIAS(), DBF(), INUSE(), NDX(), NETERR(), SELECT(), SET CACHELOAD, SET DCACHE, SET EXCLUSIVE, USE

Description

The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty. The <expN> is a numeric expression giving a workarea number in which to check for an open table. The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table. The alias can be specified in the USE command. If not specified, the table basename is used.


Example

// The demo view bridge opens
// the tables customer, accounts,
// state and products in workareas 1 – 4
use demo
? select()
         1
? used()
.T.
? used("product")
.T.
? used(5)
.F.


Products

Recital, Recital Server