It uses this override: public int IndexOf(FbParameter value) and checks only if an instance present in the collection, not name. So Amro El-Fakharany is right, it needs to be rewrote to check by name. The exception message tells the same: "FbParameterCollection already contains FbParameter with ParameterName '" + value.ParameterName + "'."
On 30 September 2015 at 09:29, Amro El-Fakharany <amro00...@gmail.com> wrote: > Hi Jiri, > you're not spinning circles. > Either the check should be value.ParameterName or FbParameter should override > the Equals() method accordingly. > > >> -----Ursprüngliche Nachricht----- >> Von: Jiří Činčura [mailto:j...@cincura.net] >> Gesendet: Mittwoch, 30. September 2015 08:12 >> An: firebird-net-provider@lists.sourceforge.net >> Betreff: [Firebird-net-provider] Parameter check >> >> Hi *, >> >> I'm looking at >> https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/ >> NETProvider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterC >> ollection.cs#L379 >> and I have a strong feeling the check is not correct. The check should >> contain >> `value.ParameterName`, isn't it? Or am I spinning in my own circles... >> >> -- >> Mgr. Jiří Činčura >> Independent IT Specialist >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Firebird-net-provider mailing list >> Firebird-net-provider@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > > ------------------------------------------------------------------------------ > _______________________________________________ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider ------------------------------------------------------------------------------ _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider