I have methods for updating data in my SQLite database looking like this:
public void IncrementPoints(Phrase phrase, int pts)
{
lock (l)
{
db2.Execute("UPDATE phrase SET Points = Points + " + pts +
" WHERE PhraseId = '" + phrase.PhraseId + "'");
}
}
It was mentioned to me "why do you call lock in your code", but I am not sure of the answer.
Can someone tell me is it necessary to call lock like this when doing a simple update in SQLite?