0

Please bear with me! None of the Office updates have fixed the old Nov 2019 bug:

Access error: "Query is corrupt"

I know there are solutions like:

Before:

UPDATE Table1 SET Field1 = "x" WHERE (Field2=1);  

After:

UPDATE (SELECT * FROM Table1) SET Field1 = "x" WHERE (Field2=1);  

but how do you solve this if you work through a datatable?

ssql = "SELECT * FROM tblProject"
da = New OleDb.OleDbDataAdapter(ssql, con)
da.Fill(ds, "UpdateCoverPage")

Dim cb2 As New Data.OleDb.OleDbCommandBuilder(da)

   fill datatable here with data to be updated into ms access

da.Update(ds, "UpdateCoverPage")

What is the right syntax? I can't find anything online about this.

when I try to update office i get : enter image description here

so --- strange goingons!!!!

  • Since the update statement will be auto-generated by `da.Update`, I don't think there's much you can do here. Anyway, this workaround shouldn't be *necessary*, since the bug [has been fixed for all version of MS Access](https://stackoverflow.com/a/58833831/87698). Which version of MS Access/Office do you use? – Heinzi May 07 '20 at 11:18
  • I have Office professional edition 2013 - when I tried to update the fixes i got the message that there are no products that are affected by the update (paraphrasing here!) I wish it were so simple!!! – sven liegeois May 07 '20 at 11:21
  • Hmmm... maybe VB.NET uses a different Access-DB driver. What bitness does your VB.NET project have? And what bitness does Office have? Are all available Windows Updates installed? – Heinzi May 07 '20 at 11:52
  • not sure what you mean by bitness. 32/64bit? mine is 32 bit. as far as I can tell windows is completely up to date – sven liegeois May 07 '20 at 14:29
  • Yes, I mean 32/64 bit. What bitness does your VB.NET project have (see project settings)? And what bitness does Office have (see About)? Don't guess, look it up. :-) And what is your (exact) connection string? I'm trying to find out whether your VB.NET app perhaps uses a different Access DB driver than the one used by your Office installation (and, thus, does not get the updates). And another question: Are you *sure* that it is this bug? I.e., does a manual UPDATE statement in VB.NET yield this exact problem? – Heinzi May 07 '20 at 15:30
  • in the settings under "compile" prefer 32 bit is checked. Access is 32 bit as well. connectionstring is : Provider=Microsoft.ACE.OLEDB.12.0;Data Source= followed by location and filename. I was using the same pc, the same software, the same connectionstring without any issues until that fateful november day in 2019... I'm sure it is the same bug. – sven liegeois May 07 '20 at 16:04
  • @svenliegeois Maybe your copy of Office 2013 hasn't updated completely - up-to-date version information is at [Update history for Office 2013](https://learn.microsoft.com/en-us/officeupdates/update-history-office-2013). – Andrew Morton May 07 '20 at 18:21

0 Answers0