MATLAB: Is it possible to set up Windows Authentication for ODBC data sources

accessauthenticationbasedatadatabaseDatabase Toolboxmicrosoftodbcpasswordusernamewindows

I would like to set up Windows Authentication for my data source such that I do not have to provide username and password each time I connect to the database.

Best Answer

The ODBC connection should be created with the following property enabled:
'Windows NT authentication using the network login ID'
MATLAB should now be able to connect to the datasource without specifying the username and password. However, empty strings will still need to be passed in as arguments corresponding to these fields:
conn=database('myDataSource',' ',' ');