| | |
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 |
Tag cloud for VB.NET
.net .net2008 2008 access add advanced application array basic beginner browser button buttons center click client code combo convert cpu cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse employees excel exists filter forms function html images input listview map mobile module msaccess mysql net number objects open page pan panel pdf picturebox picturebox2 port position print printing printpreview read regex remove reuse right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver storedprocedure textbox timer timespan transparency txttoxmlconverter usercontol validation vb vb.net vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web winforms winsock wpf wrapingcode xml year





