REPLACE Alias.Field While Alias Not Active

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

SYMPTOMS

REPLACE <alias.field> WITH <exp>, where <exp> is any text string, numeric value, or logical value, does not fill <field> with expected <exp>.

CAUSE

This problem may be caused by one of the following conditions. (Note that either of these first two causes will result in a corresponding error message.)

  • There is a syntax error in the command line.
  • The alias or field name does not exist.
  • The record pointer in the current and/or receiving work area is at EOF() or BOF().

    NOTE: The REPLACE command will not cause an error message if the record pointer is at EOF() or BOF(). The replace will simply not occur.

RESOLUTION

To correct this problem, do the following:

  1. Check the command line for spelling or other related syntax errors.

  2. Verify that the alias and field name exist and are spelled correctly.

  3. Move the record pointer to a valid data record. For example:

          GO TOP
    


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
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.