This explanation might be quite lengthy for the point I'm trying to make, so bear with me...
I am building an application that will enable a user of the program to enter personal details for people (ex.: Contacts, or Friends...) and store them to a delimited text (*.txt) file. I have already done this, and made it work, but I am making a new version with more features. Previous version had the ability for the user to fill in the text boxes and click a "SAVE" button to store the data to the text file. However, the user had to open the text file (it was named "user_info.txt") to view the entries. Each time you clicked save, the text in the boxes would be appended so all previous entries were not overwritten.
In the new version, I would like to implement the ability for the user to save, view, and modify the entries from within the same Program.
What I want is this: Drop-down menu for last name (viewing only) to select the line of data, text box for last name (create/modify only), text box for First Name, etc., etc.,...
I was told by another member a rough way of doing this, but the more specific things, for example, of how to use what he mentioned, are a bit beyond my capacity at the current moment. I am writing in VB.NET 2010, and I am scavenging trying to find out how to use datasets (or arrays if it will do the same thing while being easier).
Back to the arrays and data sets.... The member told me to use a StreamReader to retrieve all the data line by line, sorting it into some sort of a collection using data sets or arrays. I don't know how to do this (neither of them; arrays, nor data sets), and, as I mentioned, msdn.microsoft.com proved to be more of a headache than a help (also one of his suggestions, if I remember correctly). Any Help (especially quick responses (are)) is much appreciated.
Thank you in advance.
Page 1 of 1
1 Replies - 1931 Views - Last Post: 16 August 2012 - 05:14 PM
Replies To: Using DataSets in VB.NET 2010
Re: Using DataSets in VB.NET 2010
Posted 16 August 2012 - 05:14 PM
Datasets are containers for datatables and typically used for databases. Arrays would be difficult since there is more then one data field. A custom class that contains the properties for each field your setting would work well with a List(Of <this custom class>). StreamReaders work well text files and you could also move to XmlSerialization with the custom class design.
Page 1 of 1