|Use the debugger.
Put a breakpoint on the
cmd.ExecuteNonQuery();and when it hits, look closely at exactly what is in the three variables
Then go to your MySql management software and run a SELECT to seem how many records match that criteria.
If it's zero, then no rows will be deleted.
Back to Visual studio, and use
step over to execute the
Back to the DB management, and run the query again.
How many rows this time?
If it hasn't changed, then go back to your code and look at it really carefully ... does "-" have the same effect as "="?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!