Skip to main content
Solved

Error:

  • December 4, 2025
  • 8 replies
  • 148 views

Hello,

 

Three of my collegueas where developing in our dev enviroment. And when trying to save the project, we got the error:

An error occurred while saving the project to the database.

An item with the same key has already been added.

Detailed error:
An error occurred while saving the project to the database.

Er is al een item met dezelfde sleutel toegevoegd.

Details:

Er is al een item met dezelfde sleutel toegevoegd.
Module: mscorlib
System.ArgumentException
bij System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
bij System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
bij TimeXtender.DataManager.ProjectPerspective.AddProjectPerspectiveItem(ProjectPerspectiveItemsRow itemRow)
bij TimeXtender.DataManager.Project.InitProject(Int32 version, DsProject loadDsProject, DataSet adaptersDataSet, ProjectsRow projectRow)
bij TimeXtender.DataManager.Project.LoadProject(DsProject _dsProject)
bij TimeXtender.DataManager.Project.<>c__DisplayClass136_0.<LoadProject>b__0()
bij TimeXtender.DataManager.ConnectingThread.ExecuteConnectingThread(Object dummy)

Er is al een item met dezelfde sleutel toegevoegd.
Module: timeXtender
TimeXtender.DataManager.ExceptionWrapperException
bij TimeXtender.DataManager.ConnectingThread.HandleError()
bij TimeXtender.DataManager.ConnectingThread.Execute(String title, Int32 progressSteps, List`1 actions)
bij TimeXtender.DataManager.Project.LoadProject(Guid _projectId, LockStrategy _lockStrategy, Int32 version, IWin32Window dialog, String projectName, String title)
bij TimeXtender.DataManager.ProjectController.LatestProject(Guid guid, LockStrategy lockStategy)
bij TimeXtender.DataManager.SaveProjectCommand.LoadProject(Guid projectId, Int32 version, LockStrategy lockStategy)
bij TimeXtender.DataManager.SaveProjectCommand.Execute()

Time: 2025-12-04 11:58:07
UTC: 2025-12-04 10:58:07
Title: TX_Informatieloket - TimeXtender 20.10.45.64
Application: 20.10.45.64
Repository: 20.10.45.64
SQL Server: Microsoft SQL Server 15.0.4410.1 NT x64
User: tbakker
Domain: NETWERK
OS: Microsoft Windows Server 2022 Standard
OS version: Microsoft Windows NT 6.2.9200.0
Machine name: RD170
CPU count: 6
Build: 64 bit

Could someone please help us. We are not able to work.

 

I have already submitted a ticket with number #38101 

Best answer by Thomas Lind

Hi ​@Timmm 

The right procedure is to contact us by creating a ticket. We require help from the developers to find what have made it get this error and what to change to gain access again.

This is usually caused by multiple people working on the same fields at the same time. So someone deletes a field that another uses in a lookup and similar. 

The best way to avoid getting this issue in the first place is to always use Work Items
 

And by always choosing the Save and reload option before deploying.

Doing this will make all changes part of the project you are about to deploy and likely avoid any issues like the ones explained above.

UPDATE

The issue was that two different users added the same table to the same perspective.

8 replies

Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • Answer
  • December 5, 2025

Hi ​@Timmm 

The right procedure is to contact us by creating a ticket. We require help from the developers to find what have made it get this error and what to change to gain access again.

This is usually caused by multiple people working on the same fields at the same time. So someone deletes a field that another uses in a lookup and similar. 

The best way to avoid getting this issue in the first place is to always use Work Items
 

And by always choosing the Save and reload option before deploying.

Doing this will make all changes part of the project you are about to deploy and likely avoid any issues like the ones explained above.

UPDATE

The issue was that two different users added the same table to the same perspective.


  • Problem Solver
  • December 8, 2025

We had the exact same issue two weeks ago. It turned out that there were conflicting records in one of the tables in the TimeXtender repository database (objects with overlapping validFrom and validTo fields).

This was fixed by manually deleting the misbehaving records.


  • Author
  • Participant
  • December 8, 2025

@Thomas Lind  en ​@RLB ,

 

Thank you for your replies. The issue has been fixed with a query to delete the conflicting records. 

@Thomas Lind , could you ask paw for the select query which he used to find the conflicting records.

Thank you! 


  • Problem Solver
  • December 8, 2025

BTW I had to wait for our TX partner to delete the records. I wrote the select query myself but I don't have delete permissions :)


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • December 8, 2025

I added an update.


  • Author
  • Participant
  • December 8, 2025

@RLB , are you willing to share?


  • Problem Solver
  • December 8, 2025

@RLB , are you willing to share?

 

This was the exact same issue apparently, because ​@Thomas Lind just mentioned that a table had been added to the same perspective twice. It's what we had done as well.

In our case things started breaking in version 1217, hence the 1217 in the query. Also the tables had “cs” in their names:

select t.Name,
txpi.TxObjectId, txpi.ValidFrom, txpi.ValidTo, *
from dsa.tx_ProjectPerspectiveItems as txpi
inner join dsa.tx_ProjectPerspectives as txp
on txpi.ProjectPerspectiveId = txp.ProjectPerspectiveId
left join pre.tx_datatables as t
on txpi.TxObjectId = t.DataTableId
where txp.Name like '%cs%'
and txp.ValidTo = 99999999
and txpi.ValidTo = 99999999
and txpi.ValidFrom >= 1217
order by 1, 2, 3

 


  • Author
  • Participant
  • December 8, 2025

@RLB , thank you very much!