Forum Discussion

AlexeyKolosov's avatar
8 years ago

Warning: Windows updates break interaction with .xls files from TestComplete

Please be aware that recent Windows updates break the JET driver which TestComplete uses to interact with Excel files saved in the old format (.xls). The issue may have different symptoms, but typically it’s an error message saying “Unexpected error from external database driver (1)”. Less popular error messages are "Reserved error (-5016)", "There is no message for this error (-5016)" or "General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process". It may appear when trying to edit the Data-Driven Loop operation in keyword tests, or during test playback - any attempt to interact with an .xls file from TestComplete may trigger this error.

Note that this is not a TestComplete issue: it’s Microsoft Windows updates breaking a Microsoft driver. However, TestComplete is using this driver to work with Excel files and therefore you may see unexpected errors in TestComplete. Microsoft is aware of this problem and they are planning to fix it:
>>>
Apart from this, Microsoft is working on a resolution and will provide an update in an upcoming release of the security patch. This is expected to be available in another 2-3 weeks or earlier.
<<<

https://blogs.msdn.microsoft.com/dataaccesstechnologies/2017/10/18/unexpected-error-from-external-database-driver-1-microsoft-jet-database-engine-after-applying-october-security-updates/


In the meantime, an easy workaround (and the recommended solution from Microsoft) is to use the newer ACE driver instead of the JET driver which is obsolete. For that, you need to save the Excel file in the new format (.xlsx), which will make TestComplete use the newer ACE driver in the Data-Driven Loop keyword test operation or force TestComplete use the newer driver explicitly via setting the UseACEDriver parameter of the DDT.ExcelDriver method to true in scripts, like this:

DDT.ExcelDriver("c:\My File.xls", "Sheet1", true)

 

Please see the following KB article for more information on possible workarounds:
https://smartbear-cc.force.com/portal/KbArticleViewer?name=Unexpected-Driver-Error-2017&sp=TestComplete

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    One thing I ran into:

     

    I have the 64-bit Microsoft Access Database driver installed but not Excel...  switching to the ACE driver but running the 32-bit TestComplete/TestExecute "breaks"... you need to make sure that, if you're going to use that workaround, you have the proper "bitness" of the driver to match the bitness of the tool.  Otherwise, it works nicely.

    • AlexeyKolosov's avatar
      AlexeyKolosov
      Staff

      Thanks for the note, Robert!

       

      Indeed, the bitness of the driver is important and must coincide with bitness of the TestComplete process. In fact, the "same bitness" rule applies not only to Excel, but also to all DB connections in TestComplete: starting from 12.40, you must pay close attention to bitness of data providers as 32-bit providers can only work with the 32-bit version of TestComplete and 64-bit providers can only work with the 64-bit version of TestComplete.