简体   繁体   English

“未找到数据源名称且未指定默认驱动程序”错误

[英]“Data source name not found and no default driver specified” error

I'm getting an error like ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified when publish the website. 我收到错误,如ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified在发布网站时ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified If I'm running the website from VisualStudio it's working fine, no issue. 如果我从VisualStudio运行网站它工作正常,没问题。 I had put the connection string in web.config file. 我把connection string放在web.config文件中。 The connection string is like <appSettings> <add key="ConnectionStr" value="DRIVER={MySQL ODBC 5.1 Driver};SERVER=10.7.26.75;PORT=3306;DATABASE=XXXXXX;UID=XXXXX;PASSWORD=root123"/> </appSettings> 连接字符串类似于<appSettings> <add key="ConnectionStr" value="DRIVER={MySQL ODBC 5.1 Driver};SERVER=10.7.26.75;PORT=3306;DATABASE=XXXXXX;UID=XXXXX;PASSWORD=root123"/> </appSettings>

Please guide me to resolve this issue. 请指导我解决此问题。

Had this same issue, the problem was I only had the 64 bit driver for my console application in C#, once I installed the 32 bit driver the program ran with no issues. 有同样的问题,问题是我在C#中只有64位驱动程序用于我的控制台应用程序,一旦我安装了32位驱动程序,程序运行没有问题。

very weird. 很奇怪。

Are you publishing to a different computer/server? 您是否发布到其他计算机/服务器? If so, it could be possible that the MySql ODBC Driver is not installed on the machine you are publishing to. 如果是这样,可能是您要发布到的计算机上未安装MySql ODBC驱动程序。

MySQL ODBC Driver: MySQL ODBC驱动程序:
http://dev.mysql.com/downloads/connector/odbc/ http://dev.mysql.com/downloads/connector/odbc/

EDIT 编辑
Another thing to check. 另一件要检查的事情。 See this article , and search for the text "Master genius John". 请参阅此文章 ,并搜索“Master genius John”文本。 He describes a similar error due to there being 32bit and 64bit versions of the driver. 他描述了一个类似的错误,因为有32位和64位版本的驱动程序。 If you are running a 64bit OS, it's possible you've configured the DSN for one version and not the other. 如果您运行的是64位操作系统,则可能已将DSN配置为一个版本而不是另一个版本。

暂无
暂无

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

相关问题 ADODB连接-错误:找不到数据源名称,并且未指定默认驱动程序 - ADODB Connection - Error: Data source name not found and no default driver specified ODBC错误-找不到数据源名称,并且未指定默认驱动程序 - ODBC Error - Data source name not found and no default driver specified 未找到数据源名称且未指定默认驱动程序 - Data source name not found and no default driver specified 未找到数据源名称且未指定默认驱动程序 - Data source name not found and no default driver specified 我的SQL连接错误Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序 - My Sql Connection error Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified “未找到数据源名称且未指定默认驱动程序”用于创建访问连接 - “Data source name not found and no default driver specified” for creating access connection 错误找不到数据源名称,并且在ADO.NET中没有使用Odbc指定默认驱动程序 - Error Data source name not found and no default driver specified with Odbc in ADO.NET 如何摆脱错误:“.net中找不到数据源名称,没有指定默认驱动程序”? - How to get rid of the error: “Data source name not found and no default driver specified” in .net? C# - 未找到数据源名称且未指定默认驱动程序异常错误 - C# - Data source name not found and no default driver specified Exception Error 附加信息:错误[IM002] [Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序 - Additional information: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM