PRB: Syntax Error When You Modify Local View w/ Reserved Words (150593)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b

This article was previously published under Q150593

SYMPTOMS

After you create a local view to a table, any attempt to modify fields with Visual FoxPro reserved words for field names results in this error:
Syntax Error

CAUSE

This error occurs when Visual FoxPro attempts to send the modified data to the source table where the field name is a Visual FoxPro reserved word.

RESOLUTION

Rename the field in the table to a non-reserved word.

STATUS

This behavior is by design.

MORE INFORMATION

Visual FoxPro does not support the use of reserved words as field names in tables. This behavior does not occur with all reserved words.

Steps to Reproduce Behavior

  1. Create a new table.
  2. Add a field called Value to the table; any data type works.
  3. Add some records to the table.
  4. Create a local view to the new table.
  5. Click the Fields tab, and add the field to the Selected Output list.
  6. Click the Update Criteria tab, and set the field to be the Key Field and Updatable. Then select the Send SQL Updates check box.
  7. Run the view.
  8. Modify the data, and move the record pointer. At this point, you receive the Syntax Error.
  9. Use =TABLEREVERT(.T.) to clear the error.

REFERENCES

For more information about reserved words, see the "Reserved Words" topic of the Visual FoxPro Help file.

Modification Type:MajorLast Reviewed:2/15/2005
Keywords:kberrmsg KB150593