"Data source name not found and no default driver specified" error
Solution 1
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 Driver:
http://dev.mysql.com/downloads/connector/odbc/
EDIT
Another thing to check. See this article, and search for the text "Master genius John". He describes a similar error due to there being 32bit and 64bit versions of the driver. If you are running a 64bit OS, it's possible you've configured the DSN for one version and not the other.
Solution 2
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.
very weird.
Able Alias
Updated on June 25, 2022Comments
-
Able Alias almost 2 years
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. If I'm running the website from VisualStudio it's working fine, no issue. I had put theconnection string
inweb.config
file. 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>
Please guide me to resolve this issue.
-
Able Alias almost 13 yearsNo, I'm trying to publish from the same machine.That machine have already installed the
ODBC Connector
-
rsbarro almost 13 yearsJust to be clear, are publishing from your dev machine to another location on your dev machine?
-
rsbarro almost 13 yearsOdd. Here's another question similar to yours with no answer: stackoverflow.com/questions/4831176/…
-
rsbarro almost 13 yearsAnd another one here: stackoverflow.com/questions/3181936/….
-
Able Alias almost 13 yearsyes, it is resolved. i have installed the 64bit version of ODBC connector, because my machine is a 64bit machine. Actually previously i have installed 32 bit ODBC connector. Thanks for your interest.
-
rsbarro almost 13 yearsGlad you got it figured out. Of course if you like this answer you could always accept it. =]