Cannot insert duplicate key row in object '...cases.REPORTING AREAS'

1424
7
Jump to solution
03-27-2020 01:43 PM
JenniferBorlick
Occasional Contributor III

I'm trying to get the Case Reporter up and going. I have followed this workflow, except I did a copy and paste to get the boundary in there. I did make sure there was a Name in the Name field. No matter what I set as the name, I get the same error. The only difference is that the duplicate key value changes to whatever the name is that I have changed it to.

Tabulate Coronavirus Cases - Coronavirus Response | ArcGIS Solutions for Local Government 

1 Solution

Accepted Solutions
MikeDagle
Esri Contributor

Hi Jennifer Borlick,

Apologies for the delay on this thread. I'd recommend re-deploying the solution (make sure you uncheck the Use Existing Items In The Organization in the Options menu of the Deploy an ArcGIS Solution step). Then test to see if you still receive the insert duplicate error. 

I'll keep an eye on this thread so feel free to ask follow up questions. 

Mike

View solution in original post

7 Replies
MikeDagle
Esri Contributor

Hi Jennifer Borlick,

Apologies for the delay on this thread. I'd recommend re-deploying the solution (make sure you uncheck the Use Existing Items In The Organization in the Options menu of the Deploy an ArcGIS Solution step). Then test to see if you still receive the insert duplicate error. 

I'll keep an eye on this thread so feel free to ask follow up questions. 

Mike

View solution in original post

JenniferBorlick
Occasional Contributor III

I'm not seeing "Use Existing Items"?

JenniferBorlick
Occasional Contributor III

Found it. 

MikeDagle
Esri Contributor

Hi Jennifer - It's in the hamburger Options menu to the right of the search box. Just above the scroll bar. 

Mike

JenniferBorlick
Occasional Contributor III

Got it. Thanks. When I attempted to re-deploy, it said that it finished, but instead of a green check mark, I got a red X.
I went into the organization and nothing had been overwritten. I deleted the Cases feature layer and the survey (The survey from Survey123 Connect) and tried it again. It worked the second time. My guess is that there was a schema lock. Let's hope I don't have to do that again.

by Anonymous User
Not applicable

Hey Mike, could you kindly help me!!!
i try to import XML to database, it works well for FileDB (Schema and Data), but for SDB give me this error "Underlying DBMS error [[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'R108_pk'. Cannot insert duplicate key in object 'dbo.GISVW_SAFE_DISTANCE'. The duplicate key value is (1).] [XML.DBO.GISVW_SAFE_DISTANCE] " 
it works well for schema only but for schema and data the previous error appears...

MikeDagle
Esri Contributor

Hi @Anonymous User  - Can you give a few more details on what you're trying to do?

Mike