#1 Add RowCount to MySQLDataReader

open
nobody
None
5
2008-01-18
2008-01-18
Anonymous
No

The MySQLDataReader class has a FieldCount (number of columns returned), but no RowCount (number of records returned).

A RowCount can be added easily with this code:
/// <summary>
/// Number of rows returned
/// </summary>
public int RowCount { get { if (IsClosed) return 0; else return dt.Rows.Count; } }

I added it on line 297 of source\MySQLDriverCS_net_2.0\MySQLDataReader.cs on the line after "public override int FieldCount".

I am attaching the source file as well.

Discussion

  • Modified MySQLDataReader.cs with RowCount property

     
    Attachments
  • rmccullough
    rmccullough
    2008-01-18

    Logged In: YES
    user_id=1152063
    Originator: NO

    Fyi, this was me. I was not logged in on accident.

     
  • broader safari thus study melting