COPY TO command problems
From https://www.xsharp.eu/forum/topic?p=33785#p33785
FUNCTION Start() AS VOID
LOCAL cDbf AS STRING
LOCAL cTarget AS STRING
cDbf := "c:\dbf\testcopy"
cTarget := "c:\dbf\target"
DbCreate(cDbf,{{"FLD1","N",10,5},{"FLD2","C",10,0}})
DbUseArea(TRUE,,cDbf,"source")
DbAppend();FieldPut(1,1);FieldPut(2,"A")
DbAppend();FieldPut(1,2);FieldPut(2,"B")
COPY TO c:\dbf\target VIA "DBFCDX" // error XS9002: Parser: unexpected input '"DBFCDX"'
COPY TO c:\dbf\target FIELDS FLD1 FOR source->FLD1 > 1 // XSharp.Error: Value does not fall within the expected range.
COPY TO c:\dbf\target // XSharp.Error: Value does not fall within the expected range.
Fixed a typo in dbcmd.xh which took care of most of the issues, but the VIA problem still remains. Looks like a preprocessor problem due to the various versions of COPY TO defined in the .xh file
COPY TO c:\dbf\target VIA "DBFCDX" // error XS9002: Parser: unexpected input '"DBFCDX"'
Adjusted dbcmd.xh and FoxProCmd.xh to handle this.
Robert, looks good, except for in the FoxPro dialect the VIA syntax results to "error XS9002: Parser: unexpected input 'TO'"
COPY TO c:\DBF\target VIA DBFCDX COPY TO c:\DBF\target VIA "DBFCDX"
Did you forget to push your changes to FoxProCmd.xh ?
The FoxPro use command does not have a VIA clause. In FoxPro there are no RDDs
Oops right! Confirmed fixed.