Error at deployment

Thread is closed for posting
4 posts, 1 answers
  1. LordRevan007
    LordRevan007 avatar
    20 posts
    Member since:
    May 2011

    Posted 22 Nov 2011 Link to this post

    Hello there,
    I am using Telerik open access orm with postgresql to create a desktop based application that will be run in LAN area. I shared app.config through all of my projects that are in my solution changed my connection string with other one and no problem appeared. But at deloyment when I ran a query against my db I get the following exception:

    An item with the same key has already been added. mscorlib    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.OpenAccess.DBRegistry.GetDatabase(String urlOrConnectionId, Configuration& configuration)
       at Telerik.OpenAccess.Database.Get(String connectionString, BackendConfiguration backendConfiguration, MetadataContainer metadataContainer)
       at Telerik.OpenAccess.OpenAccessContextBase.GetDatabase()
       at Telerik.OpenAccess.OpenAccessContextBase.GetScope()
       at Telerik.OpenAccess.OpenAccessContextBase.ClearChanges()

    Thanks in advance for any suggestion.
  2. Answer
    Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 22 Nov 2011 Link to this post

    Hi Lordrevan007,
    Can it be that you catch the exception that was thrown by the same context and do this ClearChanges() in the exception block? It looks like you are hiding the real cause.

    Nevertheless I have changed the code so that this error cannot occur in the future. 

    Best wishes,
    Jan Blessenohl
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  3. LordRevan007
    LordRevan007 avatar
    20 posts
    Member since:
    May 2011

    Posted 23 Nov 2011 Link to this post

    Thanks a lot for the solution, I just remove clearChanges and it worked like a charm. I hope there won't be any problem.

  4. Marco Teodoro
    Marco Teodoro avatar
    53 posts
    Member since:
    Apr 2010

    Posted 23 Feb 2012 Link to this post

    I have the same problem. What have you done?
Back to Top