Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why?
Message
From
20/02/2019 08:55:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/02/2019 11:14:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Why?
Miscellaneous
Thread ID:
01666551
Message ID:
01666579
Views:
76
Likes (1)
>This works:
>
>lc_xls = "C:\myfile.xls"
>lc_fileldlist = "invno, invdte, invamt"
>COPY TO (lc_xls) FIELDS &lc_fieldlist TYPE xl5
>
>This gives a syntax error:
>lc_xls = "C:\myfile.xls"
>lc_fileldlist = "invno, invdte, invamt"
>COPY TO (lc_xls) FIELDS (lc_fieldlist) TYPE xl5
>
>Why?

() are used for "name", such as field 'name', table 'name', alias 'name', file 'name' ...

m.lc_fieldlist is not a 'name' but a comma separated list of fields.

PS: Instead of using type xl5 it is better to use something like VFP2Excel function (I have posted many samples before).
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform