42
Views
4
Comments
Solved
Error executing query i can't delete this user
Question

 Hello all, 
I tried to delete the user but i can't because I had an Error. 
Under the Monitoring Error message is :
Error executing query. The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_Q3I_INCIDENT_OSUSR_Q3I_GEBRUIKER1_BHVERID". The conflict occurred in database "B998JD021", table "dbo.OSUSR_Q3I_INCIDENT", column 'BHVERID'.
The statement has been terminated. 
How can I solve it?
Thanks in advance!

2024-08-08 11-25-20
Santhosh Mathivanan
Solution

Hi @Cemal Arik ,

The conflict happens because the record you're trying to delete is still being referenced by the BHVERID column in the OSUSR_Q3I_INCIDENT table. Please check the particular BHVERID is available in INCIDENT table or not.

Please refer the Outsystems delete rules document for more,

https://success.outsystems.com/documentation/11/building_apps/data_management/data_modeling/entity_relationships/delete_rules/

Thanks,
Santhosh

2024-12-02 13-16-47
Vipin Yadav

Hi @Cemal Arik ,

Please ensure that the user ID, used as a foreign key in another table, is protected by an existing delete rule.

You should first delete the data from the child table and then delete it from the parent table. If you do not delete the data from the child, please modify the rule to either ignore or delete.

Thanks,

Vipin Yadav 

2024-12-02 13-16-47
Vipin Yadav

I have added below image for your reference to check Delete rule.

Thanks,

Vipin Yadav

2024-08-08 11-25-20
Santhosh Mathivanan
Solution

Hi @Cemal Arik ,

The conflict happens because the record you're trying to delete is still being referenced by the BHVERID column in the OSUSR_Q3I_INCIDENT table. Please check the particular BHVERID is available in INCIDENT table or not.

Please refer the Outsystems delete rules document for more,

https://success.outsystems.com/documentation/11/building_apps/data_management/data_modeling/entity_relationships/delete_rules/

Thanks,
Santhosh

2024-10-03 19-36-33
Cemal Arik

Hi @Vipin Yadav and @Santhosh Mathivanan
The problem wasn't there. But at least you gave me some perspective. 
Actually, the problem was again in the reference entity relationship. 
It could not be deleted because the user was actually responsible for creating another event. 
Sometimes we have to look at the big picture to find a small detail.
I solved this problem

Thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.