0
I have a problem that I don’t have a clue as to why it’s happening and I can’t fix it either. I have developed a WEB application in MVC 4. I can add and edit new records. But I do not want to delete in any way. There is no error. It says it has successfully deleted but the record remains in the bank. I can only delete if I go straight to the bank. By the application no.
I checked the method ExecuteNonQuery
and it returns the value 1, saying that a row has been changed in the database. But when I go to the database the record is still there. It looks like a bug. Someone’s had that problem before?
Post the code snippet of your application that executes the method.
– Luis Henrique
see if in your code you are calling the
SaveChanges()
– Luciano Azevedo
The
autocommit
is asfalse
?– Guilherme Nascimento
Without posting the code or SQL it is difficult to give a help
– Richard Dias
a point that is not bored in the comments: does this record have any external relationship? and another thing, try to debug step by step and see iteration of the program..
– Samuel Diogo