Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a simple csv
Message
From
06/11/2014 08:34:52
 
 
To
06/11/2014 08:32:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01610048
Message ID:
01610575
Views:
44
>I am required to match the format of an existing CSV.
>
>It has pound signs #,/ and hash marks in field names. Those aren't permitted in a foxpro cursor.
>
>The only method I can come up with for creating those is to use low level file functions to modify the CSV after creation.
>
>Since I can't do a
>
>Select mytable.fileno as 'file #' from 'mytable' into cursor mycursor
>
>
>because the # sign is not allowed.
>
>IS there an easier method or do I have to use FWRITE etc.... to make the changes after creation.

Yes, you'll have to post-process the file, but no, you don't need to use LLFFs. Create the file, then read it in as a string with FileToStr(), use StrTran() to make your changes, and write it back out with StrToFile().

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform