Unique key violation

Sai Easwer Tej
Giga Expert

Hi All,

 

I am getting two errors while creating a new record.

 

Errors:

1. Invalid insert

2. "Unique key violation detected by database ((conn=number) Duplicate entry 'Field value entered by me' for key 'field'

 

Note: The field is unique false in dictionary and I'm not using current.update.() in the business rules.

 

How can I fix these errors?  I'm not sure because of which script I'm getting error.

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Daniel Oderbolz
Kilo Sage

Hi Sai

Check if there is a database index (sys_index) on the table in question with a UNIQUE constraint (unique_index=true).
This is enforced on the lowest possible level (the database) and is not reflected in the dictionary.
Best
Daniel


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

View solution in original post

Hello @Daniel Oderbolz ,

 

I have checked the sys_index table, all are Unique index = false. Is there any thing I need to check?

 

Thanks

View solution in original post

5 REPLIES 5

Daniel Oderbolz
Kilo Sage

Hi Sai

Check if there is a database index (sys_index) on the table in question with a UNIQUE constraint (unique_index=true).
This is enforced on the lowest possible level (the database) and is not reflected in the dictionary.
Best
Daniel


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

Hello @Daniel Oderbolz ,

 

I have checked the sys_index table, all are Unique index = false. Is there any thing I need to check?

 

Thanks

Hello @Sai Easwer Tej 
Enter syslog.FILTER (the upper case opens a new Tab) in the Filter Navigator and restrict "Created" to the relevant time window.

This should show you the exact SQL Statement that caused the UNIQUE KEY VIOLATION.

You can post it again here, I guess then we will find the culprit.

Cheers
Daniel


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

kalpesh9
Mega Guru

Hello @Sai Easwer Tej ,

 

Could you please check Number Maintenance(sys_number)  table and filter with the table. Open that particular record and click on the show counter link. Check the number on the counter and the latest record in the table. If that matches please increase counter by one.

 

If this answer was helpful, I would appreciate if you marked it as such - thanks!

 

Thanks,

Kalpesh