I know this question has been asked many times but my variation is slightly different and I'm pulling my hair out after spending several hours trying to get one line of code to work. I have a MySQL database and am trying to connect using ODBC. I'm on Windows 10 version 1909.
Line 13: OpenString ="DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=collections;UID=edited_out;PWD=edited_out;"
Line 14: Conn = Server.Createobject("ADODB.Connection")
Line 15: Conn.open = OpenString
The code quoted works fine on my main PC with Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0 and DRIVER={MySQL ODBC 5.3 ANSI Driver}. On the test PC with an almost identical configuration, the exact same code with the exception of the driver name fails. (Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0 and DRIVER={MySQL ODBC 8.0 ANSI Driver} or, for that matter, DRIVER={MySQL ODBC 8.0 Unicode Driver} - both installed.) Please see the attached image for evidence. I get the well-known and depressing "Data source name not found and no default driver specified". Code snippet and drivers
I realise that this error is almost always due to getting the driver name wrong. However, I've checked and rechecked my syntax and the driver installation. I know there's nothing obviously wrong with my ODBC installation since I installed LibreOffice purely for testing and was able to connect to the same database via ODBC within seconds on the same PC using the same driver shown here. Is there something different or particularly troublesome about the ODBC version 8.0 drivers? Do I need to try to downgrade this one to 5.3?
Thanks for any help.
OpenString ="DRIVER={MySQL ODBC 8.0 ANSI Driver}
works fine on a PC with driver 5.3 installed, but not on a PC with driver 8.0 installed? – Caius Jard