Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting field names into a Comma Delimited File.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00067402
Message ID:
00067406
Views:
23
>>Use the AFIELDS() function to get an array of fields and build the comma delimited string using this array. After that, just insert the string at the beggining of the file.
>>
>>BTW, why do you need this?
>>
>>Vlad
>>
>Paul
>
>The program I am importing into requires the first row to contain the
>field names and be the "header" row to correctly place the data in

What is the app you must import into? I'm asking because I remember I had to do something like that once... but I don't remember why! :) After I wrote my own small proc to do this, I found a format accepted by EXPORT that gave me exactly what I wanted. But I don't remember why I had this need, neither if the format was exactly what you need.

>the proper fields. Right now my SQL statement is creating a table,
>but I think it will be more efficient if I change it and go into a cursor
>and work with that, as I don't need to keep what the SQL creates. Any suggestions
>will be appreciated.

Obviously, if it's a temporary table, it should be a cursor! :) Other suggestions? Look at the EXPORT command. Maybe it knows how to create a file in the format you want.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform