Why am I not able to establish a JDBC connection with the "database" function when compiled using MATLAB Compiler R2021b onwards?
Show older comments
I am trying to connect to a JDBC-based database. I am compiling my code using MATLAB Compiler R2023a and trying to run the compiled code. However, I encounter the following error:
Unable to connect to database or to the URL in the tnsNames file
The issue occurs when the app is compiled using MATLAB Compiler R2021b onwards. The error is thrown when trying to run the compiled app, but there is no error thrown while compiling the app. The app works as expected when run as a script in MATLAB but does not work when run after compiling it.
How can I compile my application using newer versions of MATLAB Compiler and successfully establish a JDBC connection from my deployed application?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!