Last post Jul 08, 2019 03:45 PM by PatriceSc
Jul 08, 2019 03:23 PM|jsshivalik|LINK
What does the below code does. What values ExecuteNonQuery returns
using (SqlCommand cmdApprove = new SqlCommand("Update test SET Status = 'A' where [Invoice No] = @DocNo", con))
cmdApprove.CommandType = CommandType.Text;
Jul 08, 2019 03:45 PM|PatriceSc|LINK
It should return the number of rows affected by the INSERT,UPDATE or DELETE SQL statement you are running.
Also for this kind of question, pleaser just have a look at the documentation first: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.executenonquery?view=netframework-4.8