Error Connecting to Access Database
조회 수: 8 (최근 30일)
이전 댓글 표시
I am attempting to connect to a MS Access database from Matlab Ver 7.12.0.635 (2011a) but I get an error in con.Message. I performed the following:
dbpath='C:\Users\g553586\Documents\Database1.accdb';
url = [['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='''';DBQ='] dbpath];
con = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', url);
con
con =
Instance: ''
UserName: ''
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: '[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'
Handle: 0
TimeOut: []
AutoCommit: 'off'
Type: 'Database Object'
댓글 수: 1
Geoff Hayes
2014년 8월 28일
Jim - have you added the JDBC driver to the java static path? See MS SQL Server JDBC Windows for an example.
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!