Add a break point at ExecuteNonQuery, inspect your sqlCommand object , take a look at the parameters with the sqlcommand and make sure TicketId is being set to what you expect it to, since your update is driven by the ticketId, ensure it is being set correctly, or try running the TSQL equivalent directly on SQL server, my guess is that your ticketId variable isn't being set, code looks fine at first glance.