VBA code crashes after installing KB5064081 update (4 Viewers)

I have the same problem on several computers with Win11 and KB5064081. Different Access versions, but only 32-bit Access/Office.
My workarounds found until now (while still using ADO):
  • Use ACE provider "Microsoft.ACE.OLEDB.12.0" instead of "Microsoft.Jet.OLEDB.4.0"
  • Uninstall KB5064081
My test program to reproduce the error:

Code:
Public Sub test1()
   Dim FileName: FileName = CurrentProject.Path + "\empty.mdb"
   Dim conn As ADODB.Connection
   Set conn = New ADODB.Connection
   conn.Provider = "Microsoft.Jet.OLEDB.4.0"
   conn.Properties("Data Source") = FileName
   conn.Open
   Const sql = "select 1 as v1"
   Dim rs As ADODB.Recordset
   Set rs = conn.Execute(sql, , adCmdText)
   MsgBox "Value=" & rs!v1.Value
End Sub

empty.mdb is a newly created empty database.
In this example, the error occurs when the VBA code calls Connection.Execute().
I tried other variants to open the recordset, other SQL statements, etc. all without success.
I also tried to install the Microsoft Access Database Engine 2016 Redistributable, but that didn't replace msjtes40.dll.

I reported the error via the Feedback Hub: aka.ms/AAxs979
Please upvote there.
 
Last edited:
Thanks @christian.dheureuse and welcome to AWF

I've tried your code with both OLEDB.4.0 and 12.0 using A365 v2509 19225.20000 64-bit but still get error 3706 on the Provider line
I'm reluctant to spend time reinstalling the drivers for 64-bit as the 2016 Redist no longer seems to be available and should no longer be needed anyway.
 
It's yet another reminder that distancing myself from Microsoft products—however challenging—is the right move. I genuinely sympathize with developers still in the trenches, producing commercial software, only to be blindsided when Microsoft breaks something and the client blames them. I've been there: countless hours lost patching broken code caused by careless updates and inadequate testing, often at the expense of time with family. That chapter's closed. Never again.
 
I've now done some more testing in both 32-bit & 64.bit Access 365

32-bit
The code works using OLEDB.4.0 with both .mdb and .accdb files.
In both cases, it fails with OLEDB.12.0

64-bit
Both sets of code fail with both .mdb and .accdb destination files

I agree with @tvanstiphout that this is based on old technology. It hasn't been updated in at least 22 years
My suggestion is also that its time to update the code so that it is based on either DAO or DDL.

At the moment, based on the incomplete information I have so far from the OP, its not a bug that I'm willing to pass on to the Access team.
They have plenty to do based on code for versions that are currently supported.
 
Sorry, I made a mistake with the 32/64 bit Access versions. I only tested with 32-bit versions of Access.
I tested with:
  • Access 365 v2507 19029.20208 32-bit.
  • Access Runtime 365 16.0.19127.20154, 32-bit.
  • Access Runtime 2010 32.bit. (Still in use for a very large old Access Project application for a very small client company.)

32-bit
The code works using OLEDB.4.0 with both .mdb and .accdb files.
In both cases, it fails with OLEDB.12.0

Did you test with version 10.0.26100.5074 of C:\Windows\SysWOW64\msjtes40.dll?
Powershell command to display the DLL version:

Code:
(Get-Item "C:\Windows\SysWOW64\msjtes40.dll").VersionInfo.FileVersion

When you write "OLEDB.4.0", do you mean provider "Microsoft.Jet.OLEDB.4.0"?
And by "OLEDB.12.0", you mean provider "Microsoft.ACE.OLEDB.12.0"?

.accdb files cannot be opened with Jet. How could you open an .accdb data source with OLEDB.4.0?

When the error (0xc0000005 exception in msjtes40.dll) occurs, Access is terminated without displaying any error message. The error is only visible in the Windows application event log.
 
Last edited:
Since this seems to be a problem that occurred due to Windows update (particularly msjtes40.dll), is there a way to report it directly to Microsoft so that -hopefully :)- a fix could be released in future updates?

hurry up you only have a month to inform:

"Support for Microsoft Office 2016 ends on October 14, 2025. After this date, Microsoft will no longer provide security updates, bug fixes, or technical support for Office 2016. Continuing to use Office 2016 after this date will leave your devices vulnerable to security risks, potentially leading to security breaches, productivity losses, and compliance issues. It is highly recommended to migrate to a supported version of Office, such as Microsoft 365, to ensure continued security and support".
 
Sorry, I made a mistake with the 32/64 bit Access versions. I only tested with 32-bit versions of Access.
I tested with:
  • Access 365 v2507 19029.20208 32-bit.
  • Access Runtime 365 16.0.19127.20154, 32-bit.
  • Access Runtime 2010 32.bit. (Still in use for a very large old Access Project application for a very small client company.)



Did you test with version 10.0.26100.5074 of C:\Windows\SysWOW64\msjtes40.dll?
Powershell command to display the DLL version:

Code:
(Get-Item "C:\Windows\SysWOW64\msjtes40.dll").VersionInfo.FileVersion

When you write "OLEDB.4.0", do you mean provider "Microsoft.Jet.OLEDB.4.0"?
And by "OLEDB.12.0", you mean provider "Microsoft.ACE.OLEDB.12.0"?

.accdb files cannot be opened with Jet. How could you open an .accdb data source with OLEDB.4.0?

When the error (0xc0000005 exception in msjtes40.dll) occurs, Access is terminated without displaying any error message. The error is only visible in the Windows application event log.
Mine is 10.0.26100.5074 after the update, which you would expect (hopefully). :)
 
@christian.dheureuse
Thanks for picking up the ambiguities in my previous reply.

As stated back in post #2, I do not have Windows 11 available
I tested in 365 version 2509 build 19225.20000 32-bit and 64-bit with Windows 10

The version of msjtes40.dll is 4.0.9801.0

I may have forgotten to change to ACE for version OLEDB.12.0 so I've just retested

64-bit Access
Both sets of code from post #1 and #21 fail with provider Microsoft.Jet.OLEDB.4.0
Both sets of code work using Microsoft.ACE.OLEDB.12.0.

32-bit Access
Both sets of code work with both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0.
The code from post #21 only works with .mdb files giving an unrecognized database format for .accdb
However, the code from post #1 works with both .mdb AND .accdb files

As @arnelgp pointed out, Access 2016 / 2019 will both reach end of support on 14 Oct
Users will not be able to download new versions after that date including those updates with fixes to bugs reported before that deadline.

I would again suggest this is the time to replace the old ADOX code with DAO or DDL
 
@christian.dheureuse
Thanks for picking up the ambiguities in my previous reply.

As stated back in post #2, I do not have Windows 11 available
I tested in 365 version 2509 build 19225.20000 32-bit and 64-bit with Windows 10

The version of msjtes40.dll is 4.0.9801.0

I may have forgotten to change to ACE for version OLEDB.12.0 so I've just retested

64-bit Access
Both sets of code from post #1 and #21 fail with provider Microsoft.Jet.OLEDB.4.0
Both sets of code work using Microsoft.ACE.OLEDB.12.0.

32-bit Access
Both sets of code work with both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0.
The code from post #21 only works with .mdb files giving an unrecognized database format for .accdb
However, the code from post #1 works with both .mdb AND .accdb files

As @arnelgp pointed out, Access 2016 / 2019 will both reach end of support on 14 Oct
Users will not be able to download new versions after that date including those updates with fixes to bugs reported before that deadline.

I would again suggest this is the time to replace the old ADOX code with DAO or DDL
Hello,

Forgive me for the late reply to your posts!
I didn't mean to be rude!

I have replaced Microsoft.Jet.OLEDB.4.0 with Microsoft.ACE.OLEDB.12.0 and it is working fine
Please see the modified code and a screenshot of code execution
I have one more question: do I need to include additional references for using OLEDB.12.0?

Thank you very much!

Code:
Public Sub CreateTable(strPath As String)
Dim cnn As ADODB.Connection
Dim cat As ADOX.Catalog
Dim tbl As ADOX.Table
Dim idx As ADOX.Index
Dim flag As Boolean

Set cat = New ADOX.Catalog
cat.Create "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strPath
Set tbl = New ADOX.Table
With tbl
    .Name = "Products"
    .columns.Append "Id", adInteger
    .columns.Append "No", adInteger
    .columns.Append "Percentage", adSingle
    .columns.Append "Code", adVarWChar, 50
    Set .ParentCatalog = cat
    .columns("Id").Properties("Default") = 0
    .columns("No").Properties("Autoincrement") = True
    .columns("Percentage").Properties("Default") = 100
    .columns("Percentage").Properties("Nullable") = False
    .columns("Code").Properties("Jet OLEDB:Allow Zero Length") = False
End With
cat.Tables.Append tbl
Debug.Print tbl.columns("Id").Properties("Default")
Debug.Print tbl.columns("Percentage").Properties("Default")
Set tbl = Nothing
Set cat = Nothing

End Sub

code_execution.png
 
I have one more question: do I need to include additional references for using OLEDB.12.0?
it is already working as you said, so obviously no need to add any Reference (reference already in placed).
 
NikBab said:
I have one more question: do I need to include additional references for using OLEDB.12.0?

Actually better than that - you can now remove the old Microsoft Jet and Replications Objects 2.6 Library as its no longer needed

To run both sets of code I just needed these references:

1756892427791.png


Suggest you mark this thread as solved.
 
empty.mdb is a newly created empty database.
In this example, the error occurs when the VBA code calls Connection.Execute().
I tried other variants to open the recordset, other SQL statements, etc. all without success.
it is a New db obviously there is no table yet on it so your conn.Execute will not work.
 

Users who are viewing this thread

Back
Top Bottom