FoxPro functions for tables

Some of the more useful functions which provide information about FoxPro tables. Most apply to the current work area but many accept extra optional parameters to refer to another table. Look in the Visual FoxPro Help system for more information about command syntax.

AFIELDS(<name>) create an array <name> holding details of the fields. Note that the size of this array changed between VFP 7 and 8.
ALIAS() return the alias in use in the current work area.
AUSED(<name>) create an array <name> of the aliases in use and return the count.
CDX(1) return the full name and path of the current index file.
DBF() return the full name and path of the current table.
FCOUNT() return the number of fields in a table.
FIELD(<number>) return the name of field number <number>.
FSIZE(<name>) return the size of the field named <name>.
KEY(<number>) return the expression of index number <number>.
ORDER() return the name of the index tag in use.
RECCOUNT() return the number of records in the table. Note that RECCOUNT ignores the state of SET DELETED and SET FILTER.
RECNO() return the number of the current record.
TAGCOUNT() return the number of index tags in a table.
TAG(<number>) return the name of index number <number> in a table.
USED(<name>) return .T. if <name> is in use.

MS Access technical tips

Visual FoxPro technical tips

General Tips

 

More tips from Alvechurch Data

FoxPro Functions

FoxPro has always had functions like FREAD and FWRITE to read and write files at a low level. They can handle files which defeat the STRTOFILE and FILETOSTR functions.

Read More

Useful Visual FoxPro Commands

Description of useful FoxPro commands and functions

Read More

American date formats used by Access SQL

Microsoft Access uses an American date format in SQL commands

Read More

Visual FoxPro functions for file names

FoxPro functions to manipulate names of files and folders

Read More

FoxPro functions for manipulating text

Foxpro commands and functions for text

Read More