Microsoft KB Archive/150593

= PRB: Syntax Error When You Modify Local View w/ Reserved Words =

Article ID: 150593

Article Last Modified on 2/15/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



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.

