SQL: Column "field | variable" is not found (Error 1806), the field or variable you specified cannot be found.To reproduce the error:
create cursor test (fld1 c(10), fld2 c(10), fld3 i) x=createobject('doTest') with x .xfld1 = 'Hello' .xfld2 = 'World' .xfld3 = 1 *-- work fine insert into test values (.xfld1, .xfld2, .xfld3) browse *-- no problem here m.fld1 = .xfld1 m.fld2 = .xfld2 m.fld3 = .xfld3 update test set fld1 = m.fld1, fld2 = m.fld2, fld3 = m.fld3 where fld3 = 1 browse *-- explicitly including the object prefix; still no problem here! update test set fld1 = x.xfld1, fld2 = x.xfld2, fld3 = x.xfld3 where fld3 = 1 browse *-- now, using the .property inside the WITH-ENDWITH construct. Error 1806! update test set fld1 = .xfld1, fld2 = .xfld2, fld3 = .xfld3 where fld3 = 1 browse endwith define class doTest as session xfld1 = '' xfld2 = '' xfld3 = 0 enddefineDoes anyone know of this problem? I can't find an entry in the Apr 2001 MSDN DVD using keywords: VFP AND Update AND SQL or Foxpro AND Update AND SQL.