Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How best to parse tex tfile?
Message
From
28/04/2005 14:49:42
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01009146
Message ID:
01009399
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform