[VFP] Problem with APPEND FROM FOR command
Closed this issue · 2 comments
cpyrgas commented
In the VO dialect, following code copies 3 records from the source dbf, as it should. In the VFP dialect, it only copies 1 (the first) record. Problem is caused by the APPEND FROM UDC in FoxProCmd.xh which incorrectly maps the FOR clause to the WHILE parameter of DbAppFox()
FUNCTION Start( ) AS VOID
LOCAL cSource, cDest AS STRING
cSource := "source"
cDest := "dest"
DbCreate(cSource,{{"FLD","N",10,0}})
DbUseArea(TRUE,,cSource)
DbAppend();FieldPut(1,1)
DbAppend();FieldPut(1,3)
DbAppend();FieldPut(1,1)
DbAppend();FieldPut(1,3)
DbAppend();FieldPut(1,0)
DbCloseArea()
DbCreate(cDest,{{"FLD","N",10,0}})
DbUseArea(TRUE,,cDest)
APPEND FROM (cSource) FOR _FIELD->FLD < 2
DbGoTop()
? RecCount() // 1, should be 3
DbCloseArea()
cpyrgas commented
Should be fixed now
cpyrgas commented
Confirmed (my :)) fix