An item with the same key has already been added.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
cvanzant
Posts: 5
Joined: Wed 01 Jun 2011 17:45

An item with the same key has already been added.

Post by cvanzant » Wed 01 Jun 2011 17:55

A table that is the many end of a one to many relationship throws this error anytime it is referenced. The 'one' end of that many to many relationship throws a "Object reference not set to an instance of an object"

This happened when I updated the latest version of dotConnect for SQLite, 3.30.165.

What is the cause of this. I have been waiting for a response from the support email. What can I do? I do not wish to revert versions as I do NEED Guid support.

cvanzant
Posts: 5
Joined: Wed 01 Jun 2011 17:45

Post by cvanzant » Wed 01 Jun 2011 18:29

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Devart.Data.Linq.Mapping.MetaTypeBase.Initialize()
at Devart.Data.Linq.Mapping.ax.b()
at Devart.Data.Linq.Mapping.aj.b()
at Devart.Data.Linq.Mapping.m..ctor(MetaModel A_0, MetaTable A_1, Type A_2, MetaType A_3)
at Devart.Data.Linq.Mapping.aj..ctor(ap A_0, d A_1, Type A_2)
at Devart.Data.Linq.Mapping.d..ctor(ap A_0, TableAttribute A_1, Type A_2)
at Devart.Data.Linq.Mapping.ap.d(Type A_0)
at Devart.Data.Linq.Mapping.ap.b(Type A_0)
at Devart.Data.Linq.DataContext.GetTable[TEntity]()
at APp.DatabaseContext.get_Responses() in C:\Users\cvanzant\Projects\Ecitation Trunk\App\Client\DatabaseContext.Designer.cs:line 195

cvanzant
Posts: 5
Joined: Wed 01 Jun 2011 17:45

Post by cvanzant » Wed 01 Jun 2011 19:25

There is no data in my database. This happens when I simply ask for the EMPTY Table. Why is it adding anything at this point? Why is it inserting something else AFTER it added something?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 03 Jun 2011 12:38

Thank you for your assistance, we have reproduced and fixed the problem. The fix will be available in the nearest build which we plan to release in about two weeks.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 17 Jun 2011 16:28

We have released the new 3.30.172 build of dotConnect for SQLite, which includes the fix for this issue. The new build can be downloaded from
http://www.devart.com/dotconnect/sqlite/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the information about other fixes and improvements available in dotConnect for SQLite 3.30.172, please refer to
http://www.devart.com/forums/viewtopic.php?t=21280

Post Reply