| | |
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 add advanced application array assignment basic binary box button buttons center click code combo connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity pan peertopeervideostreaming picturebox picturebox2 plugin port print printpreview record regex reports" reuse right-to-left save savedialog search serial socket sorting sql sqldatbase storedprocedure string temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf xml





