Command and Function Differences Between dBASE and FoxPro

Last reviewed: June 28, 1995
Article ID: Q115175
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6
  • Microsoft FoxPro for MS-DOS, version 2.6

SUMMARY

The information below describes the command and function differences between dBASE and FoxPro. This information is also found in the "Switching from dBASE" topic in FoxPro 2.6 Help.

To go directly to this topic in FoxPro, choose dBASE Help from the Help menu.

MORE INFORMATION

Almost all of the hundreds of commands and functions in dBASE IV work exactly the same way in FoxPro. The degree of compatibility is extremely high, and even more so with dBASE IV 1.0 and 1.1. However, there are commands, functions, or keywords where dBASE and FoxPro differ.

@ ... GET

    In FoxPro, the REQUIRED keyword in @ ... GET is ignored.

APPEND FROM
    In FoxPro, the REINDEX keyword in APPEND FROM is ignored.

APPEND FROM ARRAY
    In FoxPro, the REINDEX keyword in APPEND FROM ARRAY is ignored.

APPEND FROM xxxx.txt TYPE DELIMITED
    While dBASE looks for the characters ", (quotation mark, followed by a
    comma) in an appended ASCII text file, FoxPro looks only for the "
    (quotation mark). As a result, files containing these delimiters do not
    append correctly in any version of FoxPro.

BARCOUNT()
    BARCOUNT() in dBASE calculates the number of bars of defined
    popups, regardless of whether or not the popup has been activated.
    BARCOUNT() in FoxPro calculates the number of bars of active
    popups. If a popup has been defined, but not activated,
    BARCOUNT(<popup name>) in FoxPro returns 0.

BROWSE
    In FoxPro, the NOORGANIZE keyword in BROWSE is ignored.

CHANGE()
    In FoxPro, CHANGE() always returns false (.F.).

COMPLETED()
    In FoxPro, COMPLETED() always returns false (.F.).

FCREATE() and FOPEN()
    In dBASE IV, the second parameter in the FCREATE() and FOPEN()
    functions can be "R" (read-only), "W" (write-only), "A" (append-
    only), "RW" or "WR (read and write) or "RA" or "AR" (read and
    append). FoxPro supports these file attributes. The following
    tables list the FoxPro behavior for these dBASE parameters.

    FCREATE()
    dBASE       FoxPro
    Parameter   Behavior
    ----------------------------------------------------------------------

    RW or WR    Creates a file with read and write privileges and sets the
                MS-DOS Archive attribute.

    A           Creates a file with read and write privileges and sets the
                MS-DOS Archive attribute.

    RA or AR    Creates a file with read and write privileges and sets the
                MS-DOS Archive attribute.

    R           Creates a file with read only privileges and sets the
                MS-DOS Read-Only attribute.

    FOPEN()
    dBASE       FoxPro
    Parameter   Behavior
    ----------------------------------------------------------------------

    RW or WR    Opens the file with read and write privileges and
                positions the file pointer at the beginning of the file.

    A           Opens the file with read only privileges and positions the
                file pointer at the end of the file.

    RA or AR    Opens the file with read and write privileges and
                positions the file pointer at the end of the file.

    R           Opens the file with read only privileges and positions the
                file pointer at the beginning of the file.

FLDLIST()
    In dBASE, FLDLIST() returns a field name followed by the ->
    operator and the table/.DBF alias. In FoxPro, FLDLIST() returns a
    field name followed by a period and the table/.DBF alias.

ID()
    ID() in dBASE returns the name of the machine that dBASE is
    running on. ID() in FoxPro returns the name of the machine that
    FoxPro is running on and the number of the machine in the network.
    If no network is present, ID() in FoxPro returns the machine name
    and 1.

ON SELECTION POPUP
    In FoxPro, the BLANK keyword in ON SELECTION POPUP is ignored.

RESET
    In FoxPro, RESET is ignored.

RUN()
    The dBASE RUN() function is not supported in FoxPro. Use FoxPro's
    RUN command instead.

SET('BORDER')
    In FoxPro, the border characters are returned. In dBASE,
    SET('BORDER') returns ASCII values for the border characters.

SET FIELDS
    In dBASE you can add /R to a field in the SET FIELDS command to
    make it read-only.  This switch is ignored in FoxPro 2.6.

SET('FIELDS',1)
    When FIELDS is set to LOCAL and COMPATIBLE is set to FOXPLUS or
    OFF, aliases are not returned with the fields names.

SET MESSAGE
    In FoxPro, the AT clause in SET MESSAGE is ignored.

USE
    In FoxPro, the NOSAVE and NOLOG keywords in USE are ignored.


Additional reference words: FoxDos FoxWin 2.60 foxhelp.dbf foxhelp.hlp
KBCategory: kbprg
KBSubcategory: FxinteropDbase


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 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.