MySQL ODBC Issue: Data source name not found and no default driver specified

六眼飞鱼酱① 提交于 2019-12-06 21:32:25

Solved the problem now. Recording here in case this of use to others.

The issue was much simpler than it first appeared. The problem was that the application used a mixture of named and unnamed datasources (DSN / DSN-Less).

It was not apparent to me that any named connections were used until I set up the application for debugging in Visual studio. Here is a rough guide to debugging the application in visual studio (Except I used HTTP based website, rather than file system):

http://www.codeproject.com/Articles/28792/Debugging-Classic-ASP-VBScript-in-Visual-Studio-20

Following creating the required DSN, there were some further exceptions being thrown regarding default values in database columns. This was due to a MySQL setting that can be changed in the my.ini file.

http://bugs.mysql.com/bug.php?id=14306

C:\Program Files (x86)\MySQL\MySQL Server 5.5\my.ini

# Set the SQL mode to strict
# sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
sql-mode=""
den232

I found this to work from Windows to MySQL as a DSN-less connection. The trick was to ELIMINATE the port spec at the end of the server address.

"DRIVER={MySQL ODBC 5.3 UNICODE Driver}; Server=**;Database=**;User=**;Password=**; OPTION=3"

Note: Server string is the internet address of the server, BUT NO PORT SPECIFIED - ie, NO ":3306" on the end

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!