Page 1 of 1

Database error: FOREIGN KEY constraint failed

Posted: December 23rd, 2020, 1:31 am
by mussabahire
Dear all, I get this error whenever we try to sync between enumerator and Team leader via Bluetooth.
This error came after undegrading csentry from 7.2 to 7.5.
I tried to remove index files but not solved.
Kindly help me.

Re: Database error: FOREIGN KEY constraint failed

Posted: December 23rd, 2020, 7:31 am
by josh
Please post sync.log files from both tablets.

Re: Database error: FOREIGN KEY constraint failed

Posted: December 24th, 2020, 12:32 am
by mussabahire
Here are the log files

Re: Database error: FOREIGN KEY constraint failed

Posted: December 24th, 2020, 8:54 am
by josh
It looks like this may be a problem with csdb files created in older versions of CSPro (7.3 and earlier). We fixed a related issue when creating new csdb files in version 7.4 and above but the data files created in old versions still have this issue. It occurs when you sync a file that has zero cases. Since the data file in question is empty, you can simple delete it and let CSPro create it again. Assuming you are using CSPro 7.4 or later the error will go away.

Re: Database error: FOREIGN KEY constraint failed

Posted: December 25th, 2020, 6:14 am
by mussabahire
Thank you Josh.
As I was checking I found empty cases.
I will delete them and see.
Regards