MATLAB Answers

Microsoft Access "Query is corrupt" error when using 'update' command with Database Toolbox

1 view (last 30 days)
Microsoft released an update for Access that introduced an issue with updating tables on Nov. 12.
The following article describes the issue and a workaround:
The workaround is to basically update the tables indirectly; however, this requires modifying the original SQL statement.
Many users may find an issue with this as it can require an intractable number of changes in their code base.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Jun 2021
Edited: MathWorks Support Team on 23 Jun 2021
There is no fix that involves not modifying the call to the 'update' command. The crux of the issue is that the WHERE clause is passed in as a string, so in order to apply the workaround suggested by Microsoft, the new 'update' command would have to parse the WHERE clause and make the appropriate modifications. Since the WHERE clause could be anything, this is not feasible.
For now, until the fix is rolled out by Microsoft, the user will have to apply the workaround from Microsoft by modifying their code interfacing with their database.
  1 Comment
Bruce MacWilliams
Bruce MacWilliams on 17 Jan 2020
Can you give an example of a code fix that works? I applied the MS patch, but I am still getting this error. How do you specify a WHERE clause without 'WHERE'?
whereclause = {'WHERE productnumber = 5';'WHERE productnumber = 8'};

Sign in to comment.

More Answers (0)


No tags entered yet.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by