DBF( ) Function

Example   See Also

Returns the name of a table open in a specified work area or a table name from a table alias.

Syntax

DBF([cTableAlias | nWorkArea])

Returns

Character

Arguments

cTableAlias

Specifies the table alias.

nWorkArea

Specifies the work area number.

If you omit cTableAlias and nWorkArea, DBF( ) returns the name of the table open in the current work area. DBF( ) returns an empty string if a table isn't open in the work area you specify. If a table doesn't have the alias you specify with cTableAlias, Visual FoxPro generates an error message.

For information on creating an alias for a table, see USE.

Remarks

When SET FULLPATH is ON, DBF( ) returns the path to the table with the table name. When SET FULLPATH is OFF, DBF( ) returns the drive on which the table resides with the table name.