>this is related to a message I submitted yesterday, where I had a base table with field validation rules and a table rule.
>
>Finally found the problem. It was the name of a field.
>
>Below is the code for the base and view table. Using a browse window the base table handles insertions, updates and deletes just fine. However if you use the view v_dummy and attempt to update the field *left* you'll get a syntax error.
>
>I believe this would be considered a BUG.
>
>Kim
>
>CREATE TABLE 'DUMMY.DBF' NAME 'DUMMY' (LEFT C(10) NOT NULL)
>
>
>CREATE SQL VIEW "V_DUMMY" ;
> AS SELECT * FROM glass!dummy
>
>DBSetProp('V_DUMMY', 'View', 'UpdateType', 1)
>DBSetProp('V_DUMMY', 'View', 'WhereType', 3)
>DBSetProp('V_DUMMY', 'View', 'FetchMemo', .T.)
>DBSetProp('V_DUMMY', 'View', 'SendUpdates', .T.)
>DBSetProp('V_DUMMY', 'View', 'UseMemoSize', 255)
>DBSetProp('V_DUMMY', 'View', 'FetchSize', 100)
>DBSetProp('V_DUMMY', 'View', 'MaxRecords', -1)
>DBSetProp('V_DUMMY', 'View', 'Tables', 'glass!dummy')
>DBSetProp('V_DUMMY', 'View', 'Prepared', .F.)
>DBSetProp('V_DUMMY', 'View', 'CompareMemo', .T.)
>DBSetProp('V_DUMMY', 'View', 'FetchAsNeeded', .F.)
>DBSetProp('V_DUMMY', 'View', 'FetchSize', 100)
>DBSetProp('V_DUMMY', 'View', 'Comment', "")
>DBSetProp('V_DUMMY', 'View', 'BatchUpdateCount', 1)
>DBSetProp('V_DUMMY', 'View', 'ShareConnection', .F.)
>
>*!* Field Level Properties for V_DUMMY
>* Props for the V_DUMMY.left field.
>DBSetProp('V_DUMMY.left', 'Field', 'KeyField', .T.)
>DBSetProp('V_DUMMY.left', 'Field', 'Updatable', .T.)
>DBSetProp('V_DUMMY.left', 'Field', 'UpdateName', 'glass!dummy.left')
>DBSetProp('V_DUMMY.left', 'Field', 'DataType', "C(10)")
Not a but. LEFT is a reserved word. The general feeling is that you should avoid anything as a procedure name, field, or variable that shows up in blue in the VFP 5.0 editor.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer