The code you wrote in this way, as long as there is no abnormality in the code, regardless of whether the database update updates the data (it is executed successfully without updating any data), the program will move towards "information modification success".
ExecuteNonQuery () is an execution with no return value, but it actually has a return value, which returns the number of rows affected by this execution database. You can define an integer, receive this return value and see if it is 0.