Hello to everyone, i have a project which base on text file. and i already know how to view the text file using a listbox, what i want to know is on how to delete a specific row in text file.. thanks;)
royaloba
0
Junior Poster in Training
Recommended Answers
Jump to Postpost an example of the textfile, and we can go from there. The concept is fairly simple, however. You open the text file, and while you are reading in all the contents, compare each line with whatever you are looking for (say, the persons social security number), and then if …
Jump to PostHow are you going to decide which row? The user has a listbox, and the listbox has all this same information? Will they be deleting the row date, time, cardno or description?
Jump to PostCan you define which ones should be removed? Anything that is not:
2005/11/11 17:50:58, Event:Access, Door:entry, Card No.:2345, Description:266:55732
Right?
Jump to PostRead each line
If it contains "Event:Access, Door:entry, Card No.", write it to the file
If not, don't
If not at end-of-file, go back to read the next line
All 13 Replies
Comatose
290
Taboo Programmer
Team Colleague
royaloba
0
Junior Poster in Training
Comatose
290
Taboo Programmer
Team Colleague
royaloba
0
Junior Poster in Training
Comatose
290
Taboo Programmer
Team Colleague
royaloba
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
royaloba
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
royaloba
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
royaloba
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.