[Solved] Update query not working in C#


Add .ExecuteNonQuery to execute the query, and add try-catch-block to catch any exception:

try
{
    ...
    SqlCommand com = new SqlCommand(queryStr, conn);
    com.ExecuteNonQuery();
    conn.Close();
    ...
}
catch (Exception ex)
{
    MessageBox.Show(ex.ToString());
}

solved Update query not working in C#