JavaScript Editor js editor     Web development 



Main Page

Returns the number of fields in a table.

FCOUNT([nWorkArea | cTableAlias])

Parameters

nWorkArea


Specifies the work area of the table for which FCOUNT(В ) returns the number of fields. FCOUNT(В ) returns 0 if a table isn't open in the work area you specify.
cTableAlias


Specifies the alias of the table for which FCOUNT(В ) returns the number of fields. Visual FoxPro generates an error message if you specify a table alias that doesn't exist.

Return Value

Numeric

Remarks

If you omit the optional arguments, FCOUNT(В ) returns the number of fields in the table open in the currently selected work area.

Example

В Copy Code
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table
SELECT 0
USE employee  && Opens employee table

CLEAR
? FCOUNT('CUSTOMER')     && Displays 13, # of fields in Customer 
? FCOUNT('EMPLOYEE')  && Displays 22, # of fields in Employee

See Also



JavaScript Editor js editor     Web development