Excel ODBC driver: Unexpected error from external database driver

Since the Windows update on October 10, the Excel ODBC drivers have stopped working. When we try to read the file, we get the following error:

"Unexpected error from external database driver (1)"

We open Excel files in Delphi using an ADO connection with the following connection string:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"; 

I can make it work by switching to Microsoft.ACE.OLEDB.12.0, but for this all our customers will have to install the Microsoft Access Database Engine, distributed on all computers on which they use our software.

Does anyone have another solution or workaround? Thanks in advance.

+5
source share
9 answers

On the client machine, I uninstalled KB4041681 (Windows 7), which appeared with the latest Microsoft patch. On my machine, I uninstalled KB4041676 (Windows 10). After that, Microsoft.Jet.OLEDB.4.0 now works.

I hope Microsoft fixes this error soon.

+3
source

There is one solution. Replace "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1" with Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyExcel.xls; Extended Properties=\"Excel 12.0;HDR = YES; After this change, you will need to install the "Office System Driver: Data Connectivity Components" component from the link on the client machine.

+1
source

I had the same problem with two applications developed by me since 3 years old (C # and java). Since October 10, 2017, I could not export to Excel 2003, but I worked in 2007 and could not import from Excel 2003, but 2007 also worked for import.

In ArcGIS Desktop 10.5.1 ESRI (the most popular geographic processing software) Failed to open Excel 2003 and .mdb files.

Temporary Solution KB4041693, KB4041687 on Windows 8.1 (possibly for w10).

The microsoft changelog in both ways says something about "[...] updates and security updates for microsoft jet". After uninstalling and rebooting, all software becomes normal again.

this problem was introduced in the 10th-2017. This issue was discussed on Microsoft forums (kb4041693 should fix it, but it still doesn't work). Perhaps in a few weeks they will pass (correctly) this problem.

+1
source

HERE is this solution ... I found it on another forum and worked fine for me ... it will work 100%

As mentioned below:

https://forums.embarcadero.com/thread.jspa?messageID=902557&tstart=0

https://forum.kanors-emr.org/showthread.php?tid=571&pid=2652#pid2652

KB4041681 installs version 4.0.9801.1 of msexcl40.dll.

  • Find the previous version (4.0.9801.0) msexcl40.dll

  • Put in another directory. They offer an application directory, but since in the next step you change the registry to point to this older version, it may be anywhere.

  • Update the registry key HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Jet \ 4.0 \ Engines \ Excel \ win32 to indicate the location from step 2.

0
source

For me, it worked as follows:

ps.: We have Windows Server 2008R2

1 - Download and install this: https://www.microsoft.com/en-us/download/details.aspx?id=23734 2 - Open the .dtsx file and change the connection to Excel. In the properties dialog box, click on the three dots in the ConnectionString property and change them to Microsoft Excel 2007. This will automatically change your connection string to: Provider = Microsoft.ACE.OLEDB.12.0; Data Source = {YOURPATH}; Advanced Properties = "Excel 12.0 XML; HDR = YES"; 3 - Some of our .dtsx files point to a configuration file (usually the extension .dtsConfig). I also changed these guys by pointing to the desired provider (pretty much copied and pasted the connection string that I received from visual studio)

After that, I ran the SQL query again and it worked fine.

0
source

If you are working with SSIS, please change the version of Excel 2003 from version 2003 to 2007 in Excel Source or Excel. In general, this problem is related to the excel version.

0
source

I had the same problem. Changed by Excel 2007 in Excel applications. It worked. This is the same as vendor change = Microsoft.ACE.OLEDB.12.0.

0
source

Uninstall these updates (according to your OS) and your code will start working fine

  • KB4041681 - Windows 7 SP1 and Windows Server 2008 R2 SP1
  • KB4041690 -Windows Server 2012
  • KB4041693 - Windows 8.1 and Windows Server 2012 R2
  • KB4041678 . This was a problem for me.

https://support.microsoft.com/en-in/help/4041678/windows-7-update-kb4041678

0
source

This issue was introduced by a recent Microsoft Office update. There are currently no alternative solutions.

-2
source

Source: https://habr.com/ru/post/1272555/


All Articles