Could this problem be due to a conflict of using drivers inconsistent with the Matlab application and the MS Access database?
Error Accessing MS Access Database in Script Run from Command Prompt
3 次查看(过去 30 天)
显示 更早的评论
I created a User Data Source named Reduction in the ODBC Source Administrator using a Microsoft Access Driver (*.mdb, *.accdb) for a MS Access Database. Interactively in Matlab, I can successfully run the following without error:
conn = database('Reduction','','');
setdbprefs('DataReturnFormat','cellarray');
disp(qry);
rslts = fetch(conn,qry);
However, when I run a script containing those commands using the following at acommand prompt:
matlab -nodesktop -nosplash -r "run O:\run_spectra_plot_by_ms_access.m"
I get the error
??? Error using ==> database.fetch at 23
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application Please verify
that login information and database url are valid.
Error in ==> run_spectra_plot_by_ms_access at 7
rslts = fetch(conn,qry);
Why am I getting that error and how can I resolve it?
3 个评论
Walter Roberson
2016-4-7
Could you verify that the version of MATLAB that you are getting when you run interactively is the same one that you get when you invoke matlab from the command line?
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!