[Firebird-net-provider] an item with the same key has already been added
Hi there, I've just compiled our project with FirebirdSql.Data.FirebirdClient.dll 2.5.0 after years of using an old connector for .NET 1.1 (and Mono). Well, I got this error: Error: An item with the same key has already been added. Server stack trace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at FirebirdSql.Data.FirebirdClient.FbDataReader.GetOrdinal(String name) at FirebirdSql.Data.FirebirdClient.FbDataReader.get_Item(String name) On a code that is doing something like: result.Id = Convert.ToInt64(CheckNull(reader["iobjid"])); result.FIdOwner = Convert.ToInt64(reader["fidowner"]); result.Comment = Convert.ToString(CheckNull(reader["scomment"])); result.UtcTimeStamp = DataParam.GetTimeStamp(reader["dtimestamp"]); result.SourceObject.Id = Convert.ToInt64(CheckNull(reader["fidsourceobject"])); result.DestinationObject.Id = Convert.ToInt64(CheckNull(reader["fiddestinationobject"])); result.LinkName = Convert.ToString(CheckNull(reader["sname"])); result.IdLink = Convert.ToInt64(CheckNull(reader["fidlink"])); return result; Which was working with the previous provider. The code is invoked in a loop (to read each record). Any idea about what's wrong with it? Thanks, pablo -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] an item with the same key has already been added
Hi, One of our team members (Dick) actually found it: the problem is related to queries having more than one field with the same name (even when they're prefixed differently). Let me explain: a reader reading the output of: select o.id, marker.id from marker, object o where marker.id = o.id will fail, and it didn't on previous versions nor with other databases. The same will be true for: select o.id, marker.* from marker, object o where marker.id = o.id pablo Jiri Cincura wrote: > On Tue, Jun 23, 2009 at 14:12, > [email protected] wrote: >> I just downloaded the official build from the firebird website. >> >> How can I check it's the official one? > > Sorry, my fault. I read, you've build the FirebirdClient assembly. So > just prepare test case if, possible. > -- ___ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
