Bug #47467 Two simple changes for DataReader
Submitted: 21 Sep 9:15 Modified: 21 Sep 9:35
Reporter: Moshe Lampert
Status: Verified
Category:Connector/Net Severity:S4 (Feature request)
Version:6.1.4 OS:Any
Assigned to: Reggie Burnett Target Version:
Triage: D5 (Feature request)

[21 Sep 9:15] Moshe Lampert
Description:
Add to MySqlDataReader one function, and change other to return useful Exception
1. GetFieldType with column name
2. GetOridinal - return what name of not fouund column

How to repeat:
Use MySQLDataReader to fetch data from MySQL Database

Suggested fix:
1. GetFieldType with column name:

	public override double GetFieldType(string column)
		{
			return GetFieldType(GetOrdinal(column));
		}

datareader.cs, line 439

2. GetOridinal - return what name of not-fouund column:

            throw new IndexOutOfRangeException(Resources.CouldNotFindColumnName + ":"
+name);

ResultSet.cs, line 114

I think that this two simple changes can make the DataReader more useful and more simple
to use.
[21 Sep 9:35] Tonci Grgin
Hi Moshe and thanks for your reasonable feature request.