Tuesday 31 October 2017

Altium kb4041681 JET database fix for unexpected error

Summary
This blog illustrates how Altium users may be able to resolve the issue created by Microsoft KB4041681, which causes a problem with JET databases in Altium: “Unexpected error from external database driver (1). (Microsoft JET Database Engine). This results in Altium being unusable - until the Microsoft update is rolled back.

Microsoft Updates
As part of Microsoft's October patch and rollout, changes were made breaking the long deprecated JET database. This has been tracked in numerous blogs such as blogs.msdn.microsoft.comFor Altium Dblib users the recommended change was mentioned in the KB4041681 release. There are two methods suggested below for resolving the issue in Altium.

My Windows 10 work computer is connected to a domain and ergo a group policy. Permanently blocking KB4041681 is not a reasonable solution when a group policy is applied to each computer, however for a Altium system originally built on Protel 99, this is fixable.


Altium.Dblib
Users Dblib file
To start the process, Altium is launched and the appropriate Dblib file located and opened.

Just beneath the source of connection section in the Altium dialog box, the JET database error message is shown.


Altium JET database error
Altium JET database error
For the methods listed below users should use the appropriate link in place of the text <my Altium excel file>.

Method 1: Changing to Excel 2007
As highlighted by the helpful folks on the EEVBlog forums the file type can be changed to Excel 2007. Older systems such as mine used Excel 2003. Changing is achieved using the drop down list box, as shown below, "Select Database Type" from Microsoft Excel to Microsoft Excel 2007.

Setting for Excel file
Setting for Excel file
Any associated Excel files(s) would need to be saved in the new .xlsx format.


Setting for Excel 2007 file
Setting for Excel 2007 file

Method 2: Changing from JET
The second method changed the database. This can my ascertained by reading the Microsoft 'kb' release which states "Download and install the Microsoft Access Database Engine 2010 Redistributable, and then modify the DB connection strings in Microsoft Excel to use ACE as a provider. Example: Change Provider=Microsoft.Jet.OLEDB.4.0 to Provider=Microsoft.ACE.OLEDB.12.0."

The connection type is changed by selecting "Use connection String" instead of "Select Database Type".

Connection string for JET in Altium
Connection string for JET in Altium
This connection string however, uses the older JET database so the Microsoft.ACE.OLEDB.12.0 is used to replace the Microsoft.Jet.OLEDB.4.0. The provision is that the database engine redistributable listed by Microsoft is installed.

Connection string for ACE in Altium
Connection string for ACE in Altium
At the same time the Excel file is saved as the newer format ".xlsx".

Testing
After saving the updated Dblib file, Altium was launched again. There were no immediate issues placing components in the schematic.

This is by no means the solution for all Altium users. The methods listed in this blog has been tested briefly on a Win 10 Pro machine running Altium 17.1.6 with all Windows updates applied.

Addendum
During testing of the solution listed above, some users noted an additional OLE related exception shown by Altium. A window similar to the image below was displayed when trying to connect to the database.


Altium database OLE exception
Altium database OLE exception
This is a known issue that has been documented by a number blog sites such as PCBParts. If an Altium Database File of type DbLib is being used, opening the file from within Altium may show a similar image to that shown below. 

First step is to backup the DbLib file. 


Altium database connection failed
Altium database connection failed
The second step, install an Office 2007 System Driver as provided from the PCBParts blog. This is one known fix.

After installation of the Office 2007 driver two results were reported. Either no further issues were seen or the Altium Database File was overwritten such that previous information about the database structure was removed - fixed by copying the DBLib file backup from the first step.


No comments:

Post a Comment