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

Last reviewed: June 27, 1995
Article ID: Q111056
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.