Skip to main content
Answer

"errorMessage":[The INSERT statement conflicted with the FOREIGN KEY constraint

  • April 29, 2022
  • 3 replies
  • 175 views

Forum|alt.badge.img+1

I have an issue with the this:

Post //WebConsoleHostName/webconsole/api/ClientGroup/clientGroupId 

{
   "clientGroupOperationType": "Update",
   "clientGroupDetail": {
   "clientGroup":{
       "clientGroupName":"smarties"
     },
      "associatedClientsOperationType": 2,
      "associatedClients": [
         {
            "clientName": "smarties-test01"
         }
      ]
   }
}

And I recieve the error:
{
"errorMessage":"INFO: [The INSERT statement conflicted with the FOREIGN KEY constraint \"APP_ClientGroupAssoc_clientId_FK\". The conflict occurred in database \"CommServ\", table \"dbo.APP_Client\", column 'id'.] [RecNum:1, Object:APP_ClientGroupAssoc, State:23000, NativeErr:547, RowNum:1, Severity:16, LineNum:1, Spid:-1] INFO: [The statement has been terminated.] [RecNum:2, LineNum:1, Spid:-1] ","errorCode":1016}

Any ide what is the problem here!

Best answer by Mike Struening

@kaka1337 were you able to find an answer to this issue?  The case @Vignesh Sekar is referring to above was resolved partially by a script called removeInvalidClientEntry.sqle, though you’d need to escalate an incident via support for that.

3 replies

Forum|alt.badge.img+3

 @kaka1337  - Can you able to do it manually?

@Corey Lodato - We had the similar kind of issue while working on the case 220418-430.

 


Forum|alt.badge.img+1
  • Author
  • Bit
  • May 2, 2022

Yes @Vignesh Sekar , I can do it.


Mike Struening
Vaulter
Forum|alt.badge.img+23

@kaka1337 were you able to find an answer to this issue?  The case @Vignesh Sekar is referring to above was resolved partially by a script called removeInvalidClientEntry.sqle, though you’d need to escalate an incident via support for that.