Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How best to parse tex tfile?
Message
De
28/04/2005 14:49:42
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01009146
Message ID:
01009399
Vues:
14
>I don't know if the following will be helpful but just in case:
>
>This is how I read a text file into a string:
>
>
>// Read the template file using StreamReader object.
>FileInfo oFileInfo = new FileInfo(path);
>StreamReader oReader = oFileInfo.OpenText();
>string stringInTemplate = oReader.ReadToEnd();
>// It is important to close the StreamReader object.
>oReader.Close();
>
>
>Once it is a string there are many ways to manipulate it in C#.NET.


Tried you example (using String.IO;) and it worked very nicely.
I had previously tried:
string cFileName;
string cContents;
cFileName=VFPToolkit.dialogs.GetFile();
cContents=VFPToolkit.strings.FileToStr(cFileName);
That does the same and also works very nicely.

Now I have to learn to efficiently parse a csv (they will be anywhere from 200 to 60,000 rows). Then add them to SQL Server.
I'm getting there step-by-step. <g>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform