Edit a text file line by line.

SteveInBeloit

Well-known member
Joined
May 22, 2006
Messages
132
Programming Experience
10+
HI,
I have a vb.net app running on a hand held device (scanner) running Win CE .NET.
It populates a text file of "transactions". Each row has six columns. I need to have a page that will allow the user to scroll through them and update or delete them. I am having trouble coming up with a way to do that. Do I read them into individual arrays, and move through them that way, then write the arrays back out to the file when they leave that page? I don't think that sounds great, but don't know what else to do.

Any thoughts,
Thanks,
Steve
 
you can use a random access file (you define the record layout and then vb treats the file as a bunch of records)

are there no databases that run on wince?
 
I didn't see anything on a random access file. I will keep reading.
Yes, there is MS sql server for CE. This is such a small straight forward app., I really didn't want to introduce that.
 
personally i would just use an Access database for this cause of the portability and this is a "small app"

since a database isnt being used i would read each record into a series of arraylists, from there you can use the Index property of the arraylists to handle each record, including adding and removing

when finished simply read through the arraylists and put them all back into the file
 
Back
Top