2 things are wrong :
tdataGridView1.Rows[x].Cells[4].Value might produce a value with a comma in it which is recognized by the database so a value of 10,4 is not seen as 10.4 but the 4 is seen as a new field
OR
some value you assign from your dataGridView is empty
Use parameters instead of building your query like this, not only is it safer but it will also fix your problem with the quantity field
example :
cmd2.CommandText = "UPDATE Pharmacy_Items Set Quantity = Quantity + @Quantity where ItemName = @ItemName";
cmd2.Parameters.AddWithValue(@Quantity, dataGridView1.Rows[x].Cells[4].Value);
cmd2.Parameters.AddWithValue(@ItemName, dataGridView1.Rows[x].Cells[1].Value);
cmd2.ExecuteNonQuery();
EDIT : the OP wants to increase the quantity field.
cmd2.CommandText = "UPDATE Pharmacy_Items Set Quantity = Quantity + @Quantity where ItemName = @ItemName";
cmd2.Parameters.AddWithValue(@Quantity, dataGridView1.Rows[x].Cells[4].Value);
cmd2.Parameters.AddWithValue(@ItemName, dataGridView1.Rows[x].Cells[1].Value);
cmd2.ExecuteNonQuery();
And if the cell can be empty you can replace the empty with 0 like this so that you just add 0 to quantity instead of getting an exception.
cmd2.CommandText = "UPDATE Pharmacy_Items Set Quantity = Quantity + @Quantity where ItemName = @ItemName";
cmd2.Parameters.AddWithValue(@Quantity, dataGridView1.Rows[x].Cells[4].Value ?? 0);
cmd2.Parameters.AddWithValue(@ItemName, dataGridView1.Rows[x].Cells[1].Value);
cmd2.ExecuteNonQuery();