You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HasRows, RecordsAffected, GetFieldType for OCTETS and RemoveAt(int) depart from the ADO.NET contract #1282
FirebirdClient 10.3 (Firebird 4.0 and 5.0) departs from the documented ADO.NET contract in four places. I have a pull request ready with a fix and tests for each, and I'll link it here. I'm opening this first, as CONTRIBUTING asks.
HasRows is true for an empty result. It returns _command.HasFields, which says whether the statement has columns, not whether it has rows. DbDataReader.HasRows: "true if the DbDataReader contains one or more rows; otherwise false."
RecordsAffected is 0 for a SELECT._recordsAffected starts at 0, although UpdateRecordsAffected treats -1 as "no count yet", and the reader adds the statement's count whatever the statement type. DbDataReader.RecordsAffected: "-1 for SELECT statements; 0 if no rows were affected or the statement failed."
GetFieldType reports String for CHAR/VARCHAR ... CHARACTER SET OCTETS, but GetValue returns byte[] (DbField.SetValue stores octets as bytes). IDataRecord.GetFieldType: "the type of Object that would be returned from GetValue."
FbParameterCollection.RemoveAt(int) throws IndexOutOfRangeException for an invalid index. The range check is also off by one (index > Count), so RemoveAt(Count) fails later, in the indexer. DbParameterCollection.RemoveAt(Int32) implements IList.RemoveAt: ArgumentOutOfRangeException when "index is not a valid index in the IList."
Activity