Read and write SQL database using matlab

2 views (last 30 days)
Fayeem
Fayeem on 10 Jun 2014
Edited: Fayeem on 10 Jun 2014
Hi, I am familiar with matlab but I have zero idea about I need to read and write a .sql file. I have "mysql-connector-java-5.1.6-bin.jar" and "2atm_fprecognition.sql" files.
1. I have copy/paste jar file: mysql-connector-java-5.1.6-bin.jar in C:\Program Files\MATLAB\R2009b\java\jarext
2.I run the code javaaddpath([matlabroot,'/java/jarext/mysql-connector-java-5.1.6-bin.jar']) .And finally write this in worskpace:
3. I downloaded "mysql-connector-odbc-5.1.13-winx64.exe" and "mysql-connector-odbc-5.1.13-winx64.exe"
4. I added both driver in 64 bit and 32 bit "administrative tools>data sources (ODBC)>system DSN" with same configuration like theimage attached.
5. I have run the code "conn = database('2atm_fprecognition.sql','root','1234');"
6. conn.MESSAGE is showing [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
For your kind information I put the database file in same folder of matlab path. I am running windows 7 64 bit, matlab R2009b 64 bit, databse toolbox version 3.6.
Now I need a step by step guidelines. If any body knows how to read or write in .sql file please help me.

Answers (0)

Community Treasure Hunt

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

Start Hunting!