|
-
Jun 28th, 2011, 12:57 AM
#1
Thread Starter
New Member
POST 2: Storing text data in a file for program use
I posted about this issue already and I did receive some helpful info from people, but unfortunately my problem still isn't resolved.
Here is what I would like to do:
- Store string data from a 'sign in' form into a text file. This text file must be one that is saved even after the user exits the program. The text file must also be one that will stay with the program even after it is published (executable).
- Be able to write to/read from the file for purposes of displaying some or all of that data on a form.
When I posted before, a couple of people suggested I use an Application Setting to do this - of type 'Specialized String Collection'. I tried this, but for some reason I could not get it to work. It was a good idea, but I need to be able to SEE the data that has been saved, and with a setting it seems like that is not easily done. I've decided that I either need to use a simple text file or a 1-table database for this. I would prefer just a text file, but in either case, it needs to be part of the .exe when published.
I have added a text file to my project, but I am not sure if it will be "included" in the project when I publish it (forgive me, I am still an amateur at this). The path of the file I've added is in 'My Documents', but in my code, I will have to specify the path in order to use Streamwriter. How will this affect the program when I publish it??
I felt the need to make a new thread because on my last one we had been mainly talking about settings, and I've decided that isn't the best option for me.
I think I just need to be educated on project files and what exactly happens when a project is turned into an .exe. I would greatly appreciate any help that I can get! Thanks everyone, including the ones who tried to help me before!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|