Electrical Design Software | Elecdes Design Suite by Scada Systems Ltd

14 November 2019

'Query is corrupt' SQL error, after Windows Update

Symptoms

Users will get errors similar to the following, at any point EDS applications try to update data in an Access Database:

Could not execute SQL statement.
UPDATE [Table] SET [Column1]='ValueA' WHERE [Column2]='ValueB'
Data in the first row is: ...
HY000 (-3067): [Microsoft][ODBC Microsoft Access Driver] Query '' is corrupt.
Stack Trace:
...

The text HY000 (-3067): [Microsoft][ODBC Microsoft Access Driver] Query '' is corrupt indicates this particular problem.


Explanation

Microsoft pushed a security update for all versions of Access (2010, 2013, 2016, 2019, 365 ProPlus) as part of their November 'Patch Tuesday'.
This update causes the MS Access driver to fail/reject legitimate SQL queries for updating data in an Access Database, thus seriously impacting the ability of IM and CS to function (as well as any other Access Database functionality, such as MDB reports in EBase).
This problem is wholly caused by Microsoft, and is not due to a bug or change in EDS.
Customers using SQL server databases (rather than Access) should not be affected.


Resolution

As of December 10, 2019, Microsoft have rolled out fixes for all versions of Office:

VersionFixed BuildRelease DateKnowledge Base Link
Access 2010 MSI
Access Database Engine 2010 Redistributable
7241.5001November 27, 2019KB2986256
Access 2010 ClickToRun7243.5000December 10, 2019
Access 2013 MSI5189.1002November 27, 2019KB2965317
Access 2013 ClickToRun5197.1000December 10, 2019
Access 2016 MSI
Access Database Engine 2016 Redistributable
4927.1002November 18, 2019KB4484198
Access 2019 Volume License10353.20037December 10, 2019
Office 365 (Monthly Channel)
Access 2016 ClickToRun
Access 2019 Retail (v1910)
12130.20390November 18, 2019
Office 365 (Semi-Annual, v1902)11328.20480November 22, 2019
Office 365 (Semi-Annual, v1808)10730.20422November 22, 2019
Office 365 (Semi-Annual, v1908)11929.20494November 22, 2019

Fixes are delivered via Windows Update/Microsoft Update, or by choosing File => Account => Update Options => Update Now, within an Office application, or can be downloaded manually via the MS Knowledge Base pages linked above.

If you still get the error after updating, install KB2986256 (for the Access Database Engine 2010 Redistributable used by EDS).

Until a fix is available for your version, the only way to get things going again is to uninstall the problematic security update.

Instructions for uninstalling the update (for Office 2010/2013/2016) are as follows:

  • Close any open EDS applications.
  • Open Control Panel, and navigate to Programs => Programs and Features => Installed Updates:
  • Sort the subsequent list by "Installed On", then scroll to the groups starting with "Microsoft Office ..." or "Microsoft Access ...", and look for entries with the following KB numbers:
    KB4484127 (Office/Access 2010)
    KB4484119 (Office/Access 2013)
    KB4484113 (Office/Access 2016)
  • Select any of the records containing the aforementioned KB numbers, and click the "Uninstall" button.
    You may be prompted for administrative credentials, or you may have to contact your IT department for assistance.
  • After uninstalling the update, EDS products should now function correctly, without SQL errors.

Office 365 ProPlus and Office 2019 use ClickToRun distribution, and require a different method to revert to a previous version.

  • https://support.microsoft.com/en-gb/help/2770432/how-to-revert-to-an-earlier-version-of-office-2013-or-office-2016-clic
  • Volume Licensed 2019:
    • Downgrade from Version 1808 (Build 10352.20042) to Version 1808 (Build 10351.20054).
  • Retail 2019 and 2016 C2R :
    • Downgrade from Version 1910 (Build 12130.20344) to Version 1909 (Build 12026.20320).
  • 365 ProPlus:
    • Monthly channel:
      • Downgrade from Version 1910 (Build 12130.20344) to Version 1910 (Build 12130.20272).
    • Semi-Annual Channel (Targeted):
      • Downgrade from Version 1908 (Build 11929.20436) to Version 1908 (Build 11929.20396).
    • Semi-Annual Channel:
      • Downgrade from Version 1902 (Build 11328.20468) to Version 1902 (Build 11328.20438).
      • Downgrade from Version 1808 (Build 10730.20416) to Version 1808 (Build 10730.20386).

Some IT departments may be able to pre-emptively block the updates from being installed, at an organisational level (provide them the above KB numbers in bold).