writing to text file question?

KingNothing

New member
Joined
Apr 8, 2006
Messages
2
Programming Experience
Beginner
Hi again,

I have made a login form for my program and i made it so that if a login fails it will write it to a txt file. Now i got it to work but everytime a login fails it just overrides that last failed login. I dont want it set like that. I would like it to add all the failed logins to the text. Here is the code i have:

Dim useractivity As System.IO.StreamWriter
useractivity =
New System.IO.StreamWriter("useractivity.txt", True)

useractivity.WriteLine("Logon Failed:" & Now())
useractivity.WriteLine("Username Entered:" & user)
useractivity.WriteLine("Password Entered:" & pass)
useractivity.Close()


Never mind i figured it out. I just added the True to append and it works great.

-KingNothing


 
Last edited:
Back
Top