It is likely that the version of Sage is not supported. Please check this first. Please note that version 126.96.36.1994 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"