繁体   English   中英

SAS ODBC连接错误

[英]SAS ODBC Connection Error

我正在尝试使用SAS v9.0连接到Windows 7计算机上的MySQL数据库。 下面是我正在使用的代码。

proc sql;
connect to odbc(datasrc=localhost user= root password=password);
create table tmp as 
select * 
from connection to odbc 
(  
select * from mysql.time_zone 
)  
;
quit;

这给了我以下错误。

ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

我正在使用MySQL ODBC 5.1驱动程序。

好像您没有在Windows中设置ODBC数据源。 转到开始->控制面板->系统和安全->管理-> ODBC数据源。 选择“添加”,提供所有要求的信息。 然后,在提交proc sql datasrc选项时,应该提供ODBC数据源名称。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM