Is it possible to use Database Toolbox 3.2 (R2006b) in 64-bit MATLAB to connect to a Microsoft Access database?
1 view (last 30 days)
Show older comments
I would like to use Database Toolbox 3.2 (R2006b) in 64-bit MATLAB to connect to a Microsoft Access database. When I set up the ODBC data source in Windows, it displays in QUERYBUILDER. However, when I try to connect to the data source, I the following error message is displayed:
"[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified"
Accepted Answer
MathWorks Support Team
on 14 Dec 2012
It is not possible to connect to a Microsoft Access database which is a 32-bit application with 64-bit MATLAB. Due to a general limitation of ODBC drivers, 64-bit MATLAB (or any 64-bit application) cannot interact with 32-bit ODBC drivers.
There are two ways to work around this issue:
1. Install 32-bit MATLAB on your 64-bit machine, and have 32-bit MATLAB and Database Toolbox communicate with the Microsoft Access Database.
If you need to work in the 64-bit MATLAB environment only, install 32-bit MATLAB on your 64-bit machine as well. Use 64-bit MATLAB as a COM automation client and 32-bit MATLAB as a COM automation server, and have 32-bit MATLAB and Database Toolbox communicate with the Microsoft Access Database.
For more information on MATLAB support for COM, please visit the following web site:
<http://www.mathworks.com/help/matlab/using-com-objects-in-matlab.html>
2. Use Microsoft Excel to communicate with the database, and then use any of the following options to transfer the retrieved data from Excel to MATLAB:
a. Use Excel Link
b. Start Excel as a COM Automation Server
c. Use XLSREAD
Excel Link:
<http://www.mathworks.com/products/excellink/>
Excel as COM Automation Server:
<http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bqdwu3j.html>
XLSREAD:
<http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/xlsread.html>
0 Comments
More Answers (0)
See Also
Categories
Find more on Database Toolbox 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!