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.

Related Items

Autocomplete

The textbox class in Visual FoxPro 9 has a new Autocomplete property.

Read More

FoxPro Tips

Top ten Visual FoxPro hints and tips

Read More

Object type codes in Access

Codes for the objects in the Access mSysObjects table.

Read More

IntelliSense in Visual Foxpro

Using and extending Intellisense in VFP.

Read More

FoxPro Trivia Quiz

How much do you really know about FoxPro?

Read More