Using $ or # in Table Name Affects DBF Name in Status Bar

ID: Q111056

The information in this article applies to:

SUMMARY

When you are opening a table in FoxPro, it is assigned a default alias, which is the name of the table. You can also use a user-defined alias to refer to the table. An alias can consist of up to 10 characters. Valid characters are letters, digits, or underscore characters; however, the alias must begin with a letter or an underscore character.

MORE INFORMATION

If a table/.DBF has a dollar sign ($), number sign (#), or any other invalid character in its alias name, and the table is open, the status bar shows A through J if the table is open in one of the first 10 work areas, or W11 through W225 if the table is open in one of the work areas between 11 to 225.

Steps to Reproduce Behavior

In the Command window, type the following:

   SELECT 1                                   && Select work area 1
   CREATE TABLE tes#t (t1 c(20), t2 n(10,2))  && Create dbf
      && the status bar shows A
   USE IN 1                        && Close tes#t table
   SELECT 200                      && Select work area 200
   USE tes#t                       && Open table tes#t
      && the status bar shows W200
   USE IN 200                      && Close tes#t table
   SELECT 10                       && Select work area 10
   USE tes#t                       && Open table tes#t
      && the status bar shows J

The ALIAS() function returns the alias name shown in the status bar; however, the DBF() function returns the actual .DBF name and path information.

REFERENCES

"Language Reference," version 2.5, page L1-23

Additional reference words: FoxDos FoxWin Fox USE 2.50 2.50a 2.50b workareas database pound sign numbers numerals KBCategory: kbprg KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995