PRB: REPLACE in Rule or Trigger Causes "Cannot Update Cursor"

Last reviewed: October 29, 1995
Article ID: Q138676
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

Issuing a REPLACE from within a RULE or TRIGGER causes an error. Typically the error is one of these:

   Cannot Update Cursor

   -or-

   Illegal Recursion in Rule Evaluation

WORKAROUND

Use the DEFAULT VALUE property in the Table Designer.

Another possibility would be to create a custom method. A custom method would be a good choice for creating key field values, especially in place of the Row Level Rule. Many times key field values are a combination of two or more fields. Thus, the DEFAULT VALUE would be to soon because the user would not have yet entered all the necessary information.

STATUS

This behavior is by design. This is currently not allowed in Visual FoxPro. It leads to recursive calls and infinite loops. However, it is possible to change a value in another table from within a Rule or Trigger.


Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbprb
KBSubcategory: FxprgTable


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