Why am I getting the error "ODBC Driver Error: Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed."

17 views (last 30 days)

I have written MATLAB code to connect to an Oracle Database using ODBC. I have the ODBC driver installed, and the MATLAB code runs successfully in MATLAB. However, I need to compile the code for deployment as a standalone application, and the executable throws the following error when I run it:
"ODBC Driver Error: Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (Oracle in instantclient_19_18_64, C:\oracle\ora19c-64\instantclient_19_18_64\SQORA32.dll)."
I have confirmed that the ODBC Driver (ex. C:\oracle\ora19c-64\instantclient_19_18_64\SQORA32.dll) exists on the machine where the application is being executed.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Oct 2024
This issue is most likely caused by the ODBC Driver not being found by the standalone app. For the application to work, the following paths must be added to the PATH system environment variable:
  • %Oracle_home%\bin
  • Directory containing ODBC Driver (ex. C:\oracle\ora19c-64\instantclient_19_18_64\)
Please refer to the following link to help set the PATH system environment variable on your machine:
 
If the application is deployed onto other machines, ensure those machines have the ODBC driver installed and these paths have been added to the PATH system environment variable on all machines.

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!