Solved

Violation of PRIMARY KEY constraint 'UPHistory_PK'.

  • 18 May 2023
  • 3 replies
  • 116 views

Userlevel 4
Badge

Hello everyone,
I’m trying to create a new instance of an existing database but I get an exception with the following error.

Kindly assist



Violation of PRIMARY KEY constraint 'UPHistory_PK'. Cannot insert duplicate key in object 'dbo.UPHistory'. The duplicate key value is (5).
The statement has been terminated.
 --------------------------------------
 Inner Exception:
 Violation of PRIMARY KEY constraint 'UPHistory_PK'. Cannot insert duplicate key in object 'dbo.UPHistory'. The duplicate key value is (5).
 The statement has been terminated.
 




​​​​

From the database this is how the situation looks like;
 



NB:database was moved to a different server.

​​Any kind of response will be highly appreciated

icon

Best answer by manikantad18 18 May 2023, 13:59

View original

3 replies

Userlevel 7
Badge +17

Hi @development93  Usually, we will get this issue when we try to insert the same details in the table, and due to key fields, it is throwing this error.

 

Userlevel 4
Badge

Hi @development93  Usually, we will get this issue when we try to insert the same details in the table, and due to key fields, it is throwing this error.

 

since the table keeps history of application update.
would deleting the available data solve the issue?

Userlevel 7
Badge +12

Hi @development93 

Thanks

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved