There's a column in my database called Points with numbers and id like to set all the records in this column to zero. how would i accomplish this ?
Here's what iv done so far,
public static void clearPoints()
{
OleDbConnection myConnection = GetConnection();
int count = 0;
string myQuery1 = "Update AnswerTable SET Points= " + count+ "'";
OleDbCommand myCommand = new OleDbCommand(myQuery1, myConnection);
try
{
myConnection.Open();
myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine("Exception in DBHandler", ex);
}
finally
{
myConnection.Close();
}
Adjust your query string to