UPDATE query is corrupt in LINQ to DB driver to MS Access database
Hi, I'm a new LINQpad user working with a simple test Access database. I have connected to the database using two different .lpx drivers (the builtin LINQ to DB, and a 'Microsoft Access Data Context Driver' that was mentioned in a forum somewhere.
Both drivers work fine with SELECT statements. Both drivers work fine with UPDATE statements that do not have a WHERE clause. But both drivers say my query is corrupt when I include a where clause. Here is the query - it works fine when I type it straight into Access.
// this one works fine
update test set foobar = "boo"
// these get an error 'Query is corrupt'
update test set foobar = "boo" where foobar = "linq to db"
update test set foobar = "boo" where ID = 1
Are where clauses somehow more difficult to implement in these Access drivers? Is it really my query that is corrupt, or are the drivers just both returning the same unhelpful error messages?
Thank you
Comments
You just hit issue with broken office update, released last month. You need to install fixed version or remove this update https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec
Thank you for saying that! I already had that webpage open in my browser for the past N days because the problem broke some of my running code. I was waiting for a fix from Microsoft instead of hacking patches myself. My theory was that with such a major breakage on such a major product they would push a fix quickly. You correctly pointed out that it applied to all queries with a WHERE clause (my issue shown above). I did not see that connection before since I was working with new software (LINQpad and the Access drivers. Thank you for answering both of my posts.
I just installed the big 2019-10 Windows cumulative update build 1809? 1909? and the WHERE clause now works fine in LINQpad. Thank you again for pointing out the underlying problem.