Text File Processing

  • Visual Basic provides libraries that allow data to be read from a text file into a program. Once the data is read from the file, it can be processed in a number ways. Assume you are a developer working for a small retail company. You have been asked to develop a Visual Basic application that reads product information from a file and generates a report. The input file contains many lines of product data: Each line contains product identification, name, price, and quantity. Explain the process you would use to generate the report.
  • A program that requires data from a text file will fail if there is a problem with the text file: file may not be accessible, file may be empty, or there may not be enough system memory to process the file. What would you do in your program to avoid these pitfalls when working with text file in your program?
Please follow and like us: