Re: Affected rows by ExecuteNonQuery()
Hi,
This is a bug on documentation, because the return value is effectively the amount of rows affected.
I have tested this many times, and even at the source code for ExecuteNonQuery method at MySqlCommand class you can see that internally a Reader is used, and the records affected is returned (This value comes from another internal class, ResultSet, which in turns receives it from the network packet response from server):
using (MySqlDataReader reader = ExecuteReader())
{
reader.Close();
return reader.RecordsAffected;
}
Regards.
Subject
Written By
Posted
Re: Affected rows by ExecuteNonQuery()
October 18, 2013 10:42AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.