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

ID: Q138676


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 5.0


SYMPTOMS

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

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 query words: VfoxWin kbvfp300 kbvfp500

Keywords :
Version : WINDOWS: 3.0,5.0
Platform :
Issue type :


Last Reviewed: August 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.