Link to home
Create AccountLog in
Avatar of BobFett

asked on

ASP Connection to MySQL 4.1.9 - ODBC problem

Hi all,

I am currently making the move from SQL Server to MySQL and am having some problems.  Previously I have always used the SQL Server ODBC driver to create a DSN for use in my ASP scripts and I had planned to do the same for MySQL.  The only problem is the new stable release of MySQL (4.1.9) is incompatible with the current ODBC driver (3.51).  I have been told that this will be fixed in version 3.53 of the ODBC driver but obviously I cannot put everything on hold until then.

Can anyone profer a suitable ASP database connection script or solution ?  I have looked up 'DSNLESS' connections but all the ones I've found are still ODBC (thus still requiring an ODBC driver).


Avatar of virmaior
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of petoskey-001

If your using ASP.Net, you can use the native drivers from ByteFX.

They are dotnet classes that let you connect directly to MySql.  It's the only alternative I know of to ODBC.
Avatar of BobFett


Virmajor - I thought DNSLESS just meant you spoke directly to the vendors driver, there seems to be an example of an OLEDB connection here:

But I don't understand how to use that for MySQL and ASP.

Petoskey, I'm using straight old ASP for this project I'm afraid so no go.

What I find strange is that there seems to be so little documentation on this, bearing in mind that ASP and MySQL 4.1.9 are not exactly an unlikely or rare combination - how is the rest of the world doing this? (thus it is I lose sleep)

Thanks for your help with this but I'm afraid my journey continues....
Avatar of BobFett


Just for the record, here is an example of a NON-ODBC DSNLESS connection for Access:

OLEDB Good Connection String (recommended)
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & server.mappath(accessDB) & ";"
'strconn=strconn & "Password=whatever;"

This is basically what I'd like to do with MySQL.  I've seen a OLEDB driver mentioned for MySQL numerous times, with comments saying "DOwnload it from the MySQL website" but have been unable to find it there.
I've never seen the OLEDB driver either.

what you could do is encapsulate your access to the MySQL DB via an Access DB
e.g. us the exact string you have there

then just Link the tables inside Access (using the DSN you made to link it directly to your ASP)

I just found an OLEDB provider for MySql.  I have no experience with this product, but it looks like it will do what your looking for.  Several newsgroup articles mention SWSoft MyOledb.  It's hosted on now.
Avatar of BobFett


Hi all,

Well - it turns out that petosky is right, there IS an OLEDB driver available but unfortunately it doesn't work with any MySQL 4.x release.  It would appear that I'm not the only person having this problem either.  The frustrating thing is that installing MySQL 4.1 actually installs the incompatible ODBC driver!!!

Points go to virmaior as I've decided to rollback back to version 4.0 for now.  Version 5 is currently in Alpha release - so I will move over to that in 2019 when they release a suitable ODBC driver.