Classic ASP under win7 connection to MySQL

Hi All:

I'm attempting to replicate my database-intensive website, written in Classic ASP, on my win7 PC using IIS Manager ASP.  I've installed MySQL, but I can't seem to connect to a database from the ASP script.  I've tried various permutations of the following connection string:

"DRIVER={MySQL ODBC 5.3 ANSI Driver};SERVER=localhost;DATABASE=abc;UID=root;PWD=password;option=3;"

Open in new window

but I keep getting the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Any thoughts?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Did you install the MySQL ODBC 5.3 ANSI Driver ?  It is a separate install from MySQL.
RustyRazorAuthor Commented:
It shows up under Control Panel -> System and Security -> Administrative Tools -> Data Sources -> Drivers

Would that means that it's installed?
Dave BaldwinFixer of ProblemsCommented:
Yes.  Is it listed by that exact name?  Can you use it to make a User DSN and test the credentials you're trying to use?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

RustyRazorAuthor Commented:
Yes, I added a User DSN and it tests successful.
Dave BaldwinFixer of ProblemsCommented:
RustyRazorAuthor Commented:
So after messing around I was able to change the error.  I made a successfully testing System DSN, which I called from my script thusly:

conn.Open "DSN=ABCdb"

Open in new window

Now the error is:

[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Does that mean that ASP is 32-bit while MySQL is 64-bit?
Dave BaldwinFixer of ProblemsCommented:
It may mean that.  There are both 32-bit and 64-bit versions of that driver.
Big MontyWeb Ninja at largeCommented:
Did you turn on "Enable 32-Bit Applications" for the application pool? I
RustyRazorAuthor Commented:
yes 32-bit enabled
RustyRazorAuthor Commented:
Whoops the word ANSI was missing in my connect string -- thanks Dave!
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad you found it.  I've run into that same problem before when I didn't use the exact driver name.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.