It is likely that the version of Sage is not supported. Please check this first. Please note that version 220.127.116.114 of Sage 50 is no longer supported and you will get this error during the batching. This version should be upgraded. We support the latest release and one major private release. The latest 2020 release is 27.0.00.0070.
Otherwise, this may be a result of corruption in the Sage database. Please try to reindex the data through Sage File > Maintenance:
Click Reindex, Select All, then OK. (You should also try the "Check Data" option.)
Then select "Compress Now"