jaymz69
asked on
Invalid Command Name
I am looking into another person program and they store the path :
Store "X:\Main\Dept\Acc\Re\IDOCS -"+ Stuff(Stuff(Stuff(Stuff(St uff(Ttoc(D atetime()) ,17,1,""), 14,1,""),1 1,1,"."),6 ,3,""),3,1 ,"")+".dbf " To m.docfilename
the select does its thing and then this code follows:
COPY TO &docfilename
VFP gives the error "Command contains unrecognized phrase\keyword"
Store "X:\Main\Dept\Acc\Re\IDOCS
the select does its thing and then this code follows:
COPY TO &docfilename
VFP gives the error "Command contains unrecognized phrase\keyword"
ASKER
where do you see the space?
Thanks
Thanks
The datetime function returns a space before AM or PM.
ASKER
still get the same error on that line for:
COPT TO &docfilename
COPT TO &docfilename
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The TTOC() result depends on the SET DATE setting and would recommend to change it for some nonambiguous format, e.g. TTOC(DATETIME(),1)
And you can remove stuff(stuff(stuff(...
And you can remove stuff(stuff(stuff(...
ASKER
That was it. I just found it in the MSDN site too
(docfilename)
(docfilename)
strtran("X:\Main\Dept\Acc\