473,383 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

TextField Parser - writing to files..

Sorryif I'm a bit of a noob here, but can any one advise me on if/how it's possible to write to files using the MY object text field parser, or suggest another method of amending records in files using delimiters.
Below is how I read from the file:

Dim x As Integer
Dim AClass As String
Dim currentRow As String()
Dim rowlen As Integer

Using Myreader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser("SBDa ta_Class.dat")
Myreader.TextFieldType = FileIO.FieldType.Delimited
Myreader.SetDelimiters(",")

While Not Myreader.EndOfData
'pull out records and write to textbox
Try
currentRow = Myreader.ReadFields
rowlen = currentRow.Length

For x = 0 To rowlen - 1
AClass = currentRow(x)
textBox1.Items.Add(AClass)
Next


Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineExceptio n
MsgBox("Line " & ex.Message & _
"is not valid and will be skipped.")
End Try
End While
End Using

Many thanks,
Phil
Nov 30 '06 #1
0 994

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Angelic Devil | last post by:
I'm building a file parser but I have a problem I'm not sure how to solve. The files this will parse have the potential to be huge (multiple GBs). There are distinct sections of the file that I...
5
by: qqcq6s59 | last post by:
Hi all I am a newbie and I just saw a ongoing thread on Fileprocessing which talks abt config parser. I have writen many pyhton program to parse many kind of text files by using string module and...
9
by: Jonas Geiregat | last post by:
I'm trying to parse a configuration file, this is the first time I'm trying something like this, and it seems hard. C's I/O functions are a mess and hard to use , that is if you want to write code...
2
by: Bastien Continsouzas | last post by:
Hello, I need to parse relatively small XML files (less than 100 kB) and to write XML files that can get quite big (the bigger I can get without having performance issues, the better). I...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
18
by: Just Another Victim of the Ambient Morality | last post by:
Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: ...
4
by: fbrewster | last post by:
I'm writing an HTML parser and would like to use Internet Explorers DOM parser. Can I use Internet Explorers DOM parser through a web service? thanks for the help
0
by: Robert Kern | last post by:
dudeja.rajat@gmail.com wrote: There are a couple of ways to do #3. One would be to use the difflib module from the standard library. The Differ.compare() method will give you a sequence of lines...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.