Why do I receive a ‘Driver Not Found/Loaded’ error when using the Database Toolbox 3.9 (R2011a) to connect to an SQL Server database?

2 views (last 30 days)
I am attempting to connect to my SQL Server database via JDBC drivers and the Database Toolbox 3.19 (R2011a). But I received the following error message:
JDBC Driver Error: com.microsoft.sqlserver.jdbc.SQLServerDriver. Driver Not Found/Loaded.
Using a previous version of MATLAB, I was able to connect without incident.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Nov 2011
This error is thrown because MATLAB does not have the required Java classpath information for the JDBC driver. Perform the following steps to add or modify the java classpath with the correct path to the JDBC driver.
1) Open the version of MATLAB that needs to connect to the database with administrator privileges.
2) Edit the classpath.txt file. Execute the following command on MATLAB command prompt to edit the current classpath.txt file.
edit classpath.txt
3) Add the complete path to the JDBC driver to classpath.txt file that was opened for editing in MATLAB editor.
4) Restart MATLAB.
5) Reconnect to the database.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!