Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Ask an expert to look at this code, which shows that the modification is successful, but the data has not changed. Make sure there is no problem with the database connection, and I don't know what the
Ask an expert to look at this code, which shows that the modification is successful, but the data has not changed. Make sure there is no problem with the database connection, and I don't know what the
Ask an expert to look at this code, which shows that the modification is successful, but the data has not changed. Make sure there is no problem with the database connection, and I don't know what the problem is! You print out the SQL text and throw it into PLSQL to see if there are any updates.

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.