Quote:
|
Originally Posted by rajus19
It will just append a line, what I want is I have to update that record only.
And one more thing is, how to get that count for a particular location.
Thanks for your immediate responce.
Raju
|
Observe the code closely. I am writing to a temporary file and moving that file on to the original. i.e. If you fail to login to India, then I write 'India 2' to the temp file. Then I try to login to US. If that succeeds, then I will be writing 'US 0' (the line that I read) to the file. After the while loop is complete the temp file has the correct information about the login failures. So I move the temp file onto your original file.