Advertisement

06.05.2008 at 10:06AM PDT, ID: 23461055
[x]
Attachment Details

VB.net StreamWriter Usage

Asked by Jimbo99999 in .NET, Microsoft Visual Basic.Net

Good Day
Experts:

I have a VB.net program here that I am trying to use a Streamwriter to create a log file.
The first time I grab the file and write out the line of data it works great...as designed.
Well, then I when the process runs again, I want to append to that file.  

Unfortunately, it is not appending it is clearing and putting the new line in it.  
I suspect it could be in my declaration --> Dim SW As New IO.StreamWriter(ResourcePathLog)

How do I do this so the StreamWriter knows to append to that file(ResourcePathLog)?

Please ask questions if my explanation is not good.

Thanks for the help,
jimbo99999Start Free Trial
[+][-]06.05.2008 at 10:08AM PDT, ID: 21721724

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: PaulHews
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.05.2008 at 10:13AM PDT, ID: 21721776

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:16AM PDT, ID: 21721798

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:18AM PDT, ID: 21721822

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:20AM PDT, ID: 21721839

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.05.2008 at 10:23AM PDT, ID: 21721860

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628