| | |
StreamWriter Is Overriding Already Written Items in File
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 86
Reputation:
Solved Threads: 0
Hello everyone. I have a small problem. I have a Streamwriter writing things to a file. But when i write more than one thing, the previous item gets overwritten. I.E. Write 1111, Write 2222. 1111 gets replaced by 2222.
Here is some of my code:
userId is a String
Here is some of my code:
VB.NET Syntax (Toggle Plain Text)
Dim fileOut As New IO.StreamWriter(fileName) fileOut.WriteLine(userId) fileOut.Close()
userId is a String
You have to create StreamWriter in the append mode
VB.NET Syntax (Toggle Plain Text)
Dim fileOut As New System.IO.StreamWriter(fileName, True)
Teme64 @ Windows Developer Blog
It appends now? Great. Please mark the thread solved and re-post that new question in a new thread, thanks.
Teme64 @ Windows Developer Blog
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Howto: Pan and Zoom an image in the picture box in vb.net?
- Next Thread: Multi Column List Boxes
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 plugin port print printing printpreview problemwithinstallation project record reports" reuse save savedialog serial server sorting sql storedprocedure string structures studio temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view visual visualbasic visualbasic.net visualstudio web wpf





