Above post ++. Use a database; it's really not as hard as you're probably imagining it is. If you have the full version of Visual Studio 2005, there are even wizards that make it a total no-brainer; these might be available with the Express editions as well, but as I have the full version, I have no experience with them.
Using a database is better for a number of reasons:
- You get valuable experience designing your tables and writing code to access the database.
- You can organize the data into fields without worrying about having to parse them.
- You gain the benefit of optimized search routines without any effort.
- You gain the benefit of optimized sorting routines without any effort.
- It's very easy to filter the data returned, so you can do things like easily find all kids' menu items, or all entrees with a price in a given range.
- Concurrent access is handled for you, at least with the better databases. This is a major benefit, as it would otherwise be a huge headache.
- Referential integrity can be enforced. This means, for example, no reference to a given product without that product actually existing.
- Relational databases make it easy to reduce the amount of redundant data that you keep, which means your data is more likely to be accurate.
Flat file storage is better for some things (such as where the file is a self-contained block of data describing one thing, such as a raster image or save game file). In your case, though, a database is by far the better solution, and even if it takes you a while to learn, you will probably save time in the long run. Maintenance and debugging will be an order of magnitude easier, too.
To answer your original question, thouugh, you can try a StreamReader:
Dim r As StreamReader = New StreamReader("c:\temp\file.txt")
Dim text As String = r.ReadLine()