Hello all,
Yesterday I got stumped by this one.
Something as simple as
Append From invoices.txt TYPE DELIMITED WITH TAB
simply wasn't working.
I'd run the program and get a "Command contains unrecognized phrase/keyword." message.
It was particularly puzzling because an Append command is probably as simple and straight-forward as they get.
The syntax was all perfect, so I started considering things like data corrupted in such a way that vfp would choke and not even get the error message right.
To further complicate things, I was able to run this in the command window without any problems, which then led me to think about a bug (great, just in time for sp1).
After about an hour of tinkering and digging here in the archives I managed to solve the problem.
I'm posting it here so that others bitten by similar problem don't have to spend the time.
The problem lied in an #include file. In it, I had the following:
#define TAB chr(9)
so my
Append From invoices.txt TYPE DELIMITED WITH TAB
was being interpreted as
Append From invoices.txt TYPE DELIMITED WITH chr(9)
which is syntactically wrong.
Workaround:
lcCommand = "Append From invoices.txt TYPE DELIMITED WITH TAB"
&lcCommand
Have fun!
Alex
Low-carb diet not working? Try the Low-food diet instead!