I need to update the students score with a new score but I cant get it to write to the line that the students current score it at. It just deletes the whole text.
Alex,letmein,0 David,qwerty1,0 John,password,0 Paul,lion,0 Luke,bennett,0 Ronald,Mcdonald,0 Erin,german,0 Laura,Scotland,0 Ross,extra,0 Alan,beverage,0
Try
fileName = "C:\Documents and Settings\Student\Desktop\Task10\primary4.txt"
Dim sWriter As New System.IO.StreamWriter(fileName)
index = lblPosition.Text
sWriter.Write(username(index))
sWriter.Write(",")
sWriter.Write(password(index))
sWriter.Write(",")
sWriter.WriteLine(updatescore(position)
sWriter.Close()
MessageBox.Show("Writing file to disk")
Me.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try