Database error: FOREIGN KEY constraint failed

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
mussabahire
Posts: 43
Joined: September 5th, 2016, 4:55 am

Database error: FOREIGN KEY constraint failed

Post 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.
Attachments
sync.PNG
sync.PNG (14.78 KiB) Viewed 2424 times
Last edited by mussabahire on December 24th, 2020, 12:26 am, edited 1 time in total.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Database error: FOREIGN KEY constraint failed

Post by josh »

Please post sync.log files from both tablets.
mussabahire
Posts: 43
Joined: September 5th, 2016, 4:55 am

Re: Database error: FOREIGN KEY constraint failed

Post by mussabahire »

Here are the log files
Last edited by mussabahire on December 25th, 2020, 6:02 am, edited 1 time in total.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Database error: FOREIGN KEY constraint failed

Post 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.
mussabahire
Posts: 43
Joined: September 5th, 2016, 4:55 am

Re: Database error: FOREIGN KEY constraint failed

Post by mussabahire »

Thank you Josh.
As I was checking I found empty cases.
I will delete them and see.
Regards
Post Reply