off course you can do this with the help of int variable, when we call this function must be return int type of value, like this see my snippet code
Update TableName set column Name=(Value of want to update) where column Name=Condition
When execute this query with help of
ExecuteNonQuery()
Must be Return int type of Value like that 1 or 0. I hope you understand what i trying in my line.
hit to replay for any query or problem.
Happy coding
jsb