Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a simple csv
Message
De
06/11/2014 08:34:52
 
 
À
06/11/2014 08:32:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01610048
Message ID:
01610575
Vues:
43
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform