MySQL 数据库错误:[Microsoft][ODBC 驱动程序管理器] 未找到数据源名称且未指定默认驱动程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5866379/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Database error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
提问by AnujAroshA
I am running SMS Enablersoftware in a Windows 7 environment. When a message received, the database is not updating and gives the error.
我在 Windows 7 环境中运行SMS Enabler软件。收到消息时,数据库未更新并给出错误。
Database error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
数据库错误:[Microsoft][ODBC 驱动程序管理器] 未找到数据源名称且未指定默认驱动程序
I also added the required field in Control Panel\All Control Panel Items\Administrative Tools > Data Sources (ODBC) > User DSN
我还添加了必填字段 Control Panel\All Control Panel Items\Administrative Tools > Data Sources (ODBC) > User DSN
I am using MySQL.
我正在使用 MySQL。
采纳答案by Garry M. Biggs
OK.... If test connection succeeds and your app fails then it is probably one of those awkward environment issues..
好的....如果测试连接成功而您的应用程序失败,那么它可能是那些尴尬的环境问题之一..
Things to check -
检查事项——
Have you creates a System DSN or User DSN?
If your application is running as a System Service then it will only able to read System DSNs (not User DSNs)
Was the Driver installed for all users or just the installation user?
I have seen instances where this has affected some drivers...
Use Process Monitor(an excellent tool for tracking down issues like this)
If you haven't used Process Monitor - think of it as a sniffer for; file accesses, registry accesses and network access...
That is - you will be able to determine whether there are any files or registry accesses that are failing or being blocked.
您是否创建了系统 DSN 或用户 DSN?
如果您的应用程序作为系统服务运行,那么它将只能读取系统 DSN(而不是用户 DSN)
驱动程序是为所有用户安装还是仅为安装用户安装?
我已经看到这影响了一些驱动程序的实例......
使用进程监视器(跟踪此类问题的出色工具)
如果你还没有使用过 Process Monitor - 把它想象成一个嗅探器;文件访问、注册表访问和网络访问...
也就是说 - 您将能够确定是否有任何文件或注册表访问失败或被阻止。
回答by CITBL
To use SMS Enabler with MySQL you should install MySQL Connector/ODBC 5.132-bit. You should install 32-bit version of this connector even if you are on 64 bit Windows. This is because SMS Enabler is a 32-bit software.
要在 MySQL 中使用 SMS Enabler,您应该安装MySQL Connector/ODBC 5.1 32-bit。即使您使用的是 64 位 Windows,您也应该安装此连接器的 32 位版本。这是因为 SMS Enabler 是 32 位软件。
回答by Garry M. Biggs
Wondering againwhether this is a 32/64bit issue?
再次想知道这是否是32/64位问题?
There are two ODBC administrators on 64bit machines...
在 64 位机器上有两个 ODBC 管理员...
c:\Windows\system32\odbcad32.exe === 64bit === Also through Control Panel
c:\Windows\system32\odbcad32.exe === 64bit === 也可以通过控制面板
c:\Windows\SysWOW64\odbcad32.exe === 32bit
c:\Windows\SysWOW64\odbcad32.exe === 32bit
If your application is 32bit then you need a 32bit ODBC Driver and have to create a 32bit ODBC data source.
如果您的应用程序是 32 位,那么您需要一个 32 位 ODBC 驱动程序,并且必须创建一个 32 位 ODBC 数据源。
If your application is 64bit then, similarly, you need a 64bit ODBC Driver and have to create a 64bit ODBC data source.
如果您的应用程序是 64 位,那么同样地,您需要一个 64 位 ODBC 驱动程序并且必须创建一个 64 位 ODBC 数据源。
I am wondering whether your application is 32bit and hence cannot find the 64bit ODBC data source you have created...
我想知道您的应用程序是否是 32 位,因此找不到您创建的 64 位 ODBC 数据源...
(NOTE: all of this is only applicable on 64bit Windows OSs...)
(注意:所有这些仅适用于 64 位 Windows 操作系统...)