I have a SQL Server database hosted on a remote machine. I am running 32-bit MATLAB version on a 64-bit Windows machine. I have created a System DSN datasource for this database from the ODBC Data Administrator. I am an adminstrator of the local machine and when I execute the 'getdatasources' command, I do not see the created datasource. To locate the data sources available, I executed the following command to make MATLAB use the 'odbc.ini' file, existing in the directory pointed by WINDIR environment variable, and not the registry:
setdbprefs('UseRegistryForSources','no');
Now, when I execute the following command
getdatasources
I get the datasource listed in the results. However, when I try connecting to the created data source, I receive the following error:
conn.Message = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
How do I resolve this issue?
Best Answer