MATLAB: Do I receive an ‘Invalid connection’ error message when trying to establish a Dynamic Database Source Name (DSN) Connection to Access within Database Toolbox 3.10 (R2011b)

accdbaccessdatadatabaseDatabase Toolboxdynamicfoundmdbnamenotsourcetoolbox

I want to establish a connection to a Dynamic Database Source Name (DSN) to an ACCDB file format Access 64-bit using Database Toolbox 64-bit. But when I run the following code, based on the instructions indicated in the documentation:
dbpath = ['C:\Data\Matlab\MyDatabase.accdb'];
url = [['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ='] dbpath];
con = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', url);
I receive an 'Invalid connection' error message.

Best Answer

The below example has been incorporated into the documentation in Release 2012b (R2012b). For previous releases, read below for any additional information:
This error occurs due an error in the URL syntax. To connect to an Access database which has an ACCDB file format, please use the following form instead:
url = [['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ='] dbpath];