Why does MATLAB return errors when connecting to SQL Server database using Database Toolbox 3.6 (R2009b) on a 64-bit Windows machine?
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!