*This post is locked for comments
*This post is locked for comments
I forgot to add this to the solution.
After making sure all users are out of GP you can delete the entries, especially in the "eConnectOutTemp"
Some of my orders having problems were also in the DEX_SESSION table.
I was having a similar error and found this post through searching.
I was attempting to insert Sales orders using Scribe Insight when I got the error. Scribe uses eConnect to write to the GP database.
[23000] SQL call failed. Violation of PRIMARY KEY constraint 'PK_eConnect_Out_temp'. Cannot insert duplicate key in object 'dbo.eConnectOutTemp'. The duplicate key value is (Sales_Transaction, 2, , , , , , , , , , , , , ). The statement has been terminated. String data, right truncation
one of the keys to fixing this problem was looking at the "eConnectOutTemp" table in GP. It seems like eConnect is not cleaning out the garbage.
Here is the SQL statements to look in tables that may be locking your files.
USE DYNAMICS
select * from SY00800
select * from SY00801
select * from ACTIVITY
use tempdb
select * from DEX_LOCK
select * from DEX_SESSION
use (replace with [Your GP Database])
[Your GP Database].dbo.eConnectOutTemp
This is an old post but I had the same issue - now resolved.
What happens is that if the line BEFORE the error line causes the SP to fail (with no errors, i.e. a fatal crash) then the next line will fail with this error (key violation) as the SP does not clean up from the previous line.
This happened to me because of the decimal places in the timesheet hours or costs - my precision (6 dp) was greater than that set by the users in GP (2 dp). So it seems that some errors do fail without a proper clean-up.
In case this helps anyone ...
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156