473,554 Members | 2,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text file access in .NET 2.0

One of Microsoft's pages says it's easier to read and write text files in
..NET 2.0 than 1.1. It doesn't say what exactly was done (to System.IO or
what class?). Can someone tell me?
Feb 3 '06 #1
4 3059
Dnia 03-02-2006 o 04:39:10 Michael A. Covington
<lo**@ai.uga.ed u.for.address> napisa³:
One of Microsoft's pages says it's easier to read and write text files in
.NET 2.0 than 1.1. It doesn't say what exactly was done (to System.IO or
what class?). Can someone tell me?

[PD] Look at File class - it has some new static methods that allow you to
quickly read and write text files (ReadAllLines, WriteAllText etc.)

Piotr Dobrowolski
Piotr.Dobrowols ki@_usun_gmail. com
Feb 3 '06 #2
I would assume they are referring to:
System.Text.Par sing.TextFieldP arser
This class is used for parsing CSV, Delimited and fixed length text files.

Brian Patterson

"Michael A. Covington" <lo**@ai.uga.ed u.for.address> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
One of Microsoft's pages says it's easier to read and write text files in
.NET 2.0 than 1.1. It doesn't say what exactly was done (to System.IO or
what class?). Can someone tell me?

Feb 3 '06 #3
I don't see it in that namespace. As far as I can tell, you're talking
about Microsoft.Visua lBasic.FileIO.T extFieldParser, which apparently
works, but I wouldn't recommend it because they implemented it using
regex's, and it is sloooow. You can speed test it vs mine,
http://www.csvreader.com , not to mention that it only provides the
most basic of csv functionality.

Feb 3 '06 #4
Thanks to all who replied!
Feb 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Chris | last post by:
Background: I am using a MS Access 2000 front end with SQL Server 8.0 back end. I have the requirement to import all text files (regardless of filename) from a given folder on the network into a table within SQL Server. This import needs to run continuously, as more text files will be saved in the folder by a separate system and they need...
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can correct once the data is in Access (or during the import process itself). Furthermore, the text files are poorly set up, such that some records may be...
by: Michael Thomas | last post by:
Hi everyone Do any of you know if this is possible in Access either by using the import tool or by writing a module in VB: I have a database containing information for a retail chain which, amongst others, has a table with fields for product description, quantity at locationx, etc. The problem is that very often I need to update it after...
by: J. Shrimp, Jr. | last post by:
Following code exports tables as text files: For Each tdf In db.TableDefs StrTblName = tdf.Name Me.txtProgName = StrTblName Me.txtProgName.Requery tblAtt = tdf.Attributes moddate = tdf.LastUpdated If Left(StrTblName, 3) <> "tbl" And tblAtt = 0 Then strSQL = "INSERT INTO tmpExport ( Code ) SELECT _
by: Andrew Chanter | last post by:
I am writing a little routine to perform the following operations from an Acces 97 mdb: 1. create a fixed width text file 2. create/establish a table type link to the text file in Access 3. allow the user to view the text contained in the text file via an Access form. I have been able to achieve this, albeit with one major limitation. ...
by: AHP | last post by:
Hi, I'm using Visual Studio 2005. I am developing a web application that uses the FileUpload control to upload text files to a directory on a webserver. This works fine. However, for me to be able to further process the files, I need to insert some data at the BEGINNING of the text file. All the solutions I've seen either append the text...
by: Child of His | last post by:
I have been through every trick I know, or has been suggested. I have a one to two million line fixed field database in text format. I want to bring it into Access 97. When I use the external data import, the list of files to import does not include text files of any type, only other database formats. On a 102,000 line text file, I was...
by: Wayne | last post by:
I've read that one method of repairing a misbehaving database is to save all database objects as text and then rebuild them from the text files. I've used the following code posted by Lyle Fairfield to accomplish the first step: Private Sub SaveObjectsAsText() path = CurrentProject.path & "\ObjectsAsText\" SaveDataAccessPagesAsText...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.