Bug #7696 Connection with VB ADO now gives "Catastrophic Failure" error.
Submitted: 6 Jan 2005 5:06 Modified: 11 Feb 2005 19:24
Reporter: Danny Bowman Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.10 OS:Windows (Windows XP SP2)
Assigned to: Peter Harvey CPU Architecture:Any
Tags: ODBC5-RC

[6 Jan 2005 5:06] Danny Bowman
Description:
All applications utilizing similar VB6 code now fail with a "Catastrophic Failure" error:

Set cn = New ADODB.Connection
cn.Open "DSN=QMCArm"  <---here is where the failure occurs.

I can successfully connect via the ODBC Data Source Administrator.  I'm using MySQL 4.1.18.  All my applications using the using ADO fail to connect with the same message.  I have MDAC 2.8 installed.

I was using the 3.51.10 release prior to your current MyODBC-3.51.10-2-win.msi download.  This version worked fine (but I deleted it from my hard drive).  The new dirver delivered in the MyODBC-3.51.10-2-win.msi package is the one causing the problems.

I tried uninstalling and reinstalling the drivers several times.  I made sure the previous version of the MyODBC drivers were completely removed.  I also reinstalled MySQL 4.1.18.  This did not resolve the issue.   

I have now reverted back to the 3.51.9 drivers utilizing the old_password syntax for creating user passwords and there is no problem.  All applications work fine with the old driver.

How to repeat:
Use Windows XP SP2. Install MDAC 2.8.  Install MySQL 4.1.18. Install the new MyODBC 3.51.10 driver. Create a user with a passowrd. Create an ODBC DSN entry vial the ODBC Data Source Administrator using the user name and password.  Create a project in VB6 with a reference to ADO 2.8.  Write the following code:

Dim cn As ADODB.Connection

Set cn = New ADODB.Connection
cn.Open "DSN=MyDSN"
[7 Jan 2005 10:38] Andrew Todd
Exact same problem with MyODBC 3.51.10-2 on W2k SP4 (MySQL 4.1.18 , MDAC 2.5 & 2.6.) using a full DSN-less connection string in .asp VBscript.

MyODBC 3.51.10-2 will not connect to MySQL 4.0.15 either, and old-passwords has no effect in 4.1.18.

Reverted to MyODBC 3.51.06 which does work with all cases above. Wanted to use 3.51.9, but it has been removed, and isn't available under the old versions links.
[7 Jan 2005 10:59] Chee Foong
Same problem here.

Using the variable in vb6 as follows: 
sConnection = "DRIVER={MySQL ODBC 3.51 Driver};USER=" & sUserName & ";PASSWORD=" & sPassword & ";SERVER=" & sServer & ";DATABASE=" & sDatabase

And tested with:

sConnection = "DRIVER={MySQL ODBC 3.51 Driver};UID=" & sUserName & ";PWD=" & sPassword & ";SERVER=" & sServer & ";DATABASE=" & sDatabase

Still get a Catastrophic Failure.. :(
[8 Jan 2005 21:13] Lutz Mndle
I get similar problems with my Delphi-Apps with the latest release, but only from WindowsXP Clients (SP1 and SP2), not from Windows 2000. All machines have MDAC 2.80 resp. 2.81 (WinXPSP2) installed.

The error can reproduced on the following way:

1. create an "Microsoft Datalink" (*.udl file)
2. in the windows explorer right click on the udl-file and set the properties of this link so, that it point to a database of a MySQL-server
3. if you test the datalink by pressing the test button on the connection tab, you get the following message (from a german systrem):

---------------------------
Microsoft Datenverknüpfungsfehler
---------------------------
Fehler beim Testen der Verbindung durch einen Fehler beim Initialisieren des Providers. [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)
---------------------------
OK   
---------------------------
[11 Jan 2005 9:05] Henri-Maxime Ducoulombier
We get similar problem if we don't give a default database to connect to, using myODBC 3.51.10

This is how we fixed the problem, for now...
[11 Jan 2005 22:03] Michael J. Fuhrman
Henri-Maxime Ducoulombier .. it appears your suggestion was cut off.  Could you repost?  And just to confirm I am having the same issue - using Windows 2000 Professional SP2.
[12 Jan 2005 2:59] Eric Stein
We have the same problem with our VB6 code using DSN or DSN-less connections on Windows 2000 Advanced Server SP4, Windows XP Pro, Windows 2003 Server Web Edition, Windows 2003 Server SBS.

Haven't identified a workaround yet.
[12 Jan 2005 17:18] [ name withheld ]
Recreated using ADO in VB .NET on Server 4.1.8 and ODBC 3.51.10-2 (2K SP3)

Can't reproduce using Server 4.1.8 and ODBC 3.51.10-1 (XP Pro SP2)

two v10s? - both with the same version information header. The v10 i downloaded today doesn't match my v10 that I downloaded a couple of weeks ago.
[14 Jan 2005 11:06] Bernhard Schmidt
ODBC 3.51.10-2: Misfunction on Win2000,XP versa MySQL 3.5x;4.0.17
ODBC 3.51.10-1: OK 

Why is this Bug not not stated Critical and not fixed for a whole week ???
[15 Jan 2005 7:33] Tim Jones
Found Same problem.  Great forum everyone!!!
[18 Jan 2005 6:56] AX
I found the same problem when using Excel VBA to connect MySQL via MyODBC 3.51.10. My problems are:

1. will it be Om if I use RDO or DAO method instead of ADO?
2. Is this bug found in 3.51-10 only? Can we use 3.51-9 as instead?
    and, Where can I download 3.51-9 ?
[18 Jan 2005 7:29] Gareth Jones
I am getting the same problem with system:

Windows 2003 Server
MDAC 2.81
MySQL 4.1 Server and Client
MyODBC 3.5.10 + MyODBC 3.5.9 (have tried both)

I recieve the error "Provider Error : Catastrophic Error" and have tried using both drivers. 

Is anyone looking into this? even Experts Exchange fix doesnt work.
[18 Jan 2005 23:50] [ name withheld ]
I have the same problem al though I can get it to work on my main PC
Windows XP SP1
Visual Basic 6

but not on my laptop which is the same setup + 2 other peopl's PC's wont run it and give the Castastrophic failure.

So i am a litte confussed as to you it works on one but not others, even more so  that they have the same setup.

Is this going to sorted out any time soon ?
[19 Jan 2005 9:24] Mohammad Shafiq Mohd Mustapa
I've aslo encontered the error. My PC specs are 

Win XP SP2
VB6
MyODBC 3.51.10.00
MySQL 4.0.23

What I do to get rid the error is using the previous version of MyODBC of 3.51.06. And my application is now working. I think MyODBC 3.51.10 is suitable for MySQL 4.1.x

Thanks
[19 Jan 2005 15:17] Manuel Vera
SAme situation,  "Catastrofic Failure" under VB6. Windows XP.
I Unistalled the last version on the Mysql Website and re-installed the previous :

MyODBC-3.51.10-x86-win-32bit

After everything worked fine.
I'm sure the issue is on the new version.  Someone has remove and republish the old one.
[19 Jan 2005 17:46] Claire Hector
I have exactly the same problem with 3.51.10

I downloaded the 3.51.06 source files however I am using Windows 2000 Pro and have had trouble with using nmake on the makefile. 

Does anyone happen to have the .msi file for this driver or know of where it can be found, or how i can configure nmake to work properly??

Cheers,
Claire
[19 Jan 2005 21:36] mohit saxena
I have the exact same problem. I'm running XP pro with SP2. I think I'll look for the older ODBC driver
[20 Jan 2005 4:48] [ name withheld ]
I'm having a similar prob.  

It works fine - on the same machine - in a vb.net application, but not in a vbs.
Strange...
I replaced version 3.51.10 with 3.51.09 and everything works fine!
[20 Jan 2005 8:38] Claire Hector
>> "I replaced version 3.51.10 with 3.51.09 and everything works fine!"

Which version of MySQL are you using?  I have tried 3.51.09 aswell and everything was not working fine for me.

Cheers,
Claire
[20 Jan 2005 14:53] Mike Hilty
I have also run into this issue.  Using the MyODBC 3.51.10 on Windows 2000 SP4 works fine using a DSN-less connection, under Windows XP (SP1 and SP2), I get the catastrophic error.

Stepping the MyODBC back to 3.51.04 on the Windows XP clients resolved the issue.

The application is written in VB6 SP4, using MDAC 2.8.  Feel free to e-mail me if you need further details on this.

My question is when this will be addressed in MyODBC, and whether it is safe or advisable to have users install MyODBC 3.51.04 instead of 3.51.10.

Thanks,
Mike Hilty
HLSM Parts and Accessories.
mikeh_at_hlsm_dot_com
[20 Jan 2005 22:49] [ name withheld ]
I downloaded the file:

http://ftp.up.ac.za/pub/windows/MySQL/Downloads/MyODBC3/MyODBC-standard-3.51.9-win.msi 

And it worked fine.
[21 Jan 2005 21:47] Wynn Wagner
On a fresh install of both MySQL (4.1.9-nt) and MyODBC (3.51.*), I get the same "Catastrophic failure." 

I've tried every version of MyODBC that I can lay my hands on, and there's no change. So far, I haven't rooted out any version as old as .04 (mentioned in this thread).

I saw a release note on one of the versions that the open connection was heavily reworked. Somebody probably put too much English on a line of code.

I see that the severity of this issue is listed as "S3 (non-critical)".  I'm completely dead in the water, so I guess critical depends on one's vantage point. 

Thanks to everyone who has been pitching in on this non-critical show-stopper. Y'all get E-for-effort.

  Wynn
[23 Jan 2005 5:48] John Lester
Same problem running MySQL Server 4.0.23 on MS Server 2003 using MDAC 2.8 & MyODBC 3.51.9 .  This combination had worked in the past, not sure what is different now.  Without reworking my entire application, I am also at a stand still.
[24 Jan 2005 23:19] Ryan
This bug isn't even listed as open any longer.  What is going on!  This is a HUGE and CRITICAL problem with no resolution in over a week!
[25 Jan 2005 20:43] Ralph Steinkönig
CONNECT!

ODBC 3.51.10 via MySQL 4.1.8

ODBC via API

Function ConnectODBCDirect Alias "MSQCONNECTODBC"(SUserName As String, _
                                                   sPwd As String, _
                                                   sDatabase As String, _
                                                   sHostName AS String, _
                                                   Byval nPortNumber As Long, _
                                                   Byval nFlags As Long) As Long
    Local hEnv    As Long
    Local hDBc    As Long
    Local hStmt   As Long
    Local rVal    AS Integer
    LOCAL sDriv   AS ASCIIZ * %MAX_PATH
    LOCAL szDrivR AS ASCIIZ * %MAX_PATH  
    Local dLen    AS Integer

    rVal = SQLAllocHandle(%SQL_HANDLE_hEnf, %SQL_NULL_HANDLE, hEnv)
    If hEnv = 0 Then Exit Function

    
    'ODBC 3 einstellen
    rVal = SQLSetEnvAttr(hEnv, %SQL_ATTR_ODBC_Version, BYVAL %SQL_OV_ODBC3, 0)
    IF rVal = %SQL_ERROR THEN Goto CleanUp1
    
    'ODBC Connections einstellen
    rVal = SQLAllocHandle(%SQL_HANDLE_hDBc, hEnv, hDBc
    If rVal = %SQL_ERROR OR hDBc = 0 Then Goto CleanUp1
    
    rVal = SQLSetConnectAttr(hDBc, %SQL_ATTR_ODBC_CURSORS, BYVAL %SQL_CUR_USE_ODBC,0)
    If rVal = %SQL_ERROR Then Goto GleanUp2

    sDriv = "Driver={MySQL ODBC 3.51 Driver}"
    If DLL_NewDriver <> "" Then sDriv = DLL_NewDriver
    sDriv = sDriv & ";" & _
            "Server=" & sHostName & ";" & _
            "Port=" & Format$(nPortNumber) $ ";" & _
            "User=" $ sUserName $ ";" & _
            "Password=" & sPwd & ";" & _
            "Option=" $ Format$(nFlags) & ";"

    rVal = SQLDriverConnect(hDBc,BYVAL %NULL, sDriv,SIZEOF(sDriv),szDrivr,SIZEOF(szDrivr),lLen,0)
    If rVal = %SQL_ERROR Then Goto CleanUp2
    rVal = SQLSetConnectOption(hDBc,%SQL_ACCESS_MODE,%SQL_MODE_READ_WRITE)   

    rVal = SQLALLOCHANDLE(%SQL_HANDLE_STMT,hDBc,hStmt)
    IF rVal = %SQL_ERROR THEN Goto CleanUp3 
        
    TLsSetValue DLL_hStmt, hStmt
    TLsSetValue DLL_hCon, hStmt                                           
    TLsSetValue DLL_hDBc, hDBc
    TLsSetValue DLL_hEnv, hEnv
    Function = hStmt

    Exit Function
CleanUp3:
    SQLFreeHandle %SQL_HANDLE_Stmt, hStmt  
CleanUp2:
     SQLFreeHandle %SQL_HANDLE_DBc, hDBc 
CleanUp1:
     SQLFreeHandle %SQL_HANDLE_ENV, hEnv
End Function
[26 Jan 2005 15:35] Dave
I have the same exact code running on two separate machines:

Windows XP SP1
VB6
MyOBDC Version 3.51.10
MySQL Server 4.1.9-nt

Windows 2000 Server SP4
VB6
MyOBDC Version 3.51.10
MySQL Server 4.1.9-nt

w/Identical DSN's

The Windows XP System works perfectly, but I get Catastrophic Failure on the Windows 2000 Server machine.  I also have several machines here at the office running Windows 2000 Professional SP4 executing similar code without a hitch.

The problem is occurs only when attempting to connect via ADO.  DAO can access the DSN within the same enviroment just fine.

** MySQL AB, if you are reading this, please fix this problem as it is a critical issue. **
[26 Jan 2005 21:02] Dave
Update to my last post:

I found a copy on another machine of the ODBC Connector version 3.51.10.  This version that I downloaded over two weeks ago is in fact different than the 3.51.10 that is available today (as noted by another member on a previous post Jan 12).  While it still does not process ADO requests, it does not display the 'Catastrophic Error' message.

I have also tried using MDAC version 2.5, 2.6, 2.7 and 2.8 with the same results.  Hope this helps narrow the search for the problem.
[26 Jan 2005 23:22] Ronald Schultz
I had a similar problem when opening a connection using ADO and ASP on Windows Server 2003. Trying several different versions of the driver didn't help until I followed the suggestion to use an older copy of version 3.51.10. There is a copy that appears to be from early November:  

http://telemedicina.unifesp.br/pub/Windows/Database/

A copy from the MySQL web site was still giving the catastrophic error as of a few hours ago. I'm not sure why visitors aren't being giving any direction on this from the folks at MySQL.
[26 Jan 2005 23:42] Dean Ellis
This will be fixed in an upcoming release, certainly; if you would like to test a development snapshot, you can download it here:

ftp://ftp.mysql.com/pub/mysql/download/MyODBC-3.51.10-2-patch3.zip

This version includes fixes which should resolve this.
[27 Jan 2005 16:55] Bryan Lowery
Dean -
I tried Peter's patch3 .dlls and they still aren't resolving the 'catastrophic error' generated in the connection string. Also, when I down-graded to the 3.51.9 ODBC drivers, I received the 'client software doesn't support this version. Consider upgrading to a newer version' error. Any ideas on how to get around this?

Bryan
[27 Jan 2005 17:27] Ronald Schultz
In case I wasn't clear in my earlier post, using the earlier version 3.51.10 driver from early November cleared the "Catastrophic Error" failure for me. I do not know why MySQL changed that version, but I have observed no problem with it so far.

A link to where one may find this driver is given in that post.
[27 Jan 2005 18:38] Bryan Lowery
Ronald -
Thanks for clarifying. I'm downloading the November version of the 3.51.10 driver and will test accordingly. I sure hope this works. I'll be sure to post the outcome.

Thanks again -

Bryan
[27 Jan 2005 18:56] Bryan Lowery
Ronald -
Using the November build of 3.51.10 fix the client-upgrade error. So now, our IIS server can see the database, which is great. However, I'm stil getting the catastrophic error when trying to serve pages via ASP. My connection string is

ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
                 "Server=our_server;" & _
                 "Port=3306;" & _
                 "Option=16387;" & _
                 "Stmt=;" & _
                 "Database=our_database;" & _
                 "Uid=our_user;" & _
                 "Pwd=our_password"

Keep in mind that the "our_*" settings are different. The line I'm getting the error on is the SQLConnection.Open in... 

Set SQLConnection = Server.CreateObject("ADODB.Connection")
SQLConnection.Open ConnectionString

Any ideas? Am I using the incoreect syntax?
ANy input you have would be greatly appreciated.
[27 Jan 2005 23:18] Ronald Schultz
Bryan -

The code that you are using for the connection string is similar to mine:
oDBConn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};
server=localhost;
uid=our_user;
pwd=our_password;
database=our_database

After reading your last post, I wanted to make certain that the fix was not something done while attempting to use the many other versions, so I tried this on a second server that had only the incorrect v. 3.51.10 driver installed:

1) un-install the old driver, using "Add or Remove Programs"
2) reboot
3) install earlier v. 3.51.10 driver
4) reboot

This second server is now working.

The reboots may have been unneeded, but I remember during my previous efforts that a reboot changed an error message from "Catastrophic Failure" to "client software doesn't support this version..." (or vice versa) at one point between version changes.

By the way, in case this information is of any use in diagnosis:
The incorrect verion only failed when attempting to open the connection with correct username/password. If an incorrect password was provided, the connection was properly denied. Using the incorrect driver returned the same results when attempting to open a connection on a v.4 MySQL database on a remote Windows 2000 machine.
[28 Jan 2005 6:47] Dean Ellis
I have tested identical connection strings as in the two examples above and, using the package I linked earlier (NOT a package from Peter's personal site) the connections are completely successful.

It sounds like either these particular binaries were not used, or they were (for one reason or another) not all copied over the existing files.  I have tried different types of connection strings (and different types of tests) and they are all working with this new set of libraries for the driver.
[28 Jan 2005 14:36] Bryan Lowery
Ronald and Dean -
Thank you both so much for your posts. It's now working as designed!!

I un-installed the November build of 3.51.10..
Rebooted the IIS server...
Installed the November build and successfully setup the ODBC connection..
Rebooted..
Tried my ASP page and gained a successfull connection.

I guess the reboot(s) were the key. Man am I glad to get over that hurdle.

Again, I really appreciate the insight from both of you.

Regards -

Bryan
[30 Jan 2005 22:16] Marcos Montes de Oca
Hi!!!

I have the same problem with Delphi's TADOConnection

If you can... help us!
[31 Jan 2005 20:15] johnsails Sails
Help!
 where can I download an old driver. 3.51.06  msi WIndows version or an exe install  
thanks
john
[1 Feb 2005 6:29] Job Oberio
i have the same problem for vb6 code.

MyODBC-3.51.10-2-win will produce "catastrophic error".

To fix that error using the aabove version
download the path at ftp://ftp.mysql.com/pub/mysql/download/MyODBC-3.51.10-2-patch3.zip

copy and overwrite patched dll system files to your windows system32 directory.
after that it should be fixed.
[2 Feb 2005 12:58] Tom Burrows
I was having the same problem connecting to mySQL database. Was using MyODBC-3.51.10-2. I patched the files using the above patch, re-opened visual basic and everything worked fine. No need to restart computer, just visual basic.

Thanks to everyone for posting here, i would probably still be scratching my head otherwise.
[2 Feb 2005 22:26] Jeroen van Blitterswijk
I have tested the today with the patch and my Delphi application using ADO and ODBC does work again with the patch. So my customers can start with implementing Windows XP SP2.
[3 Feb 2005 17:22] Dmitri Kalmar
I use mssql2mysql and when I upgrade MySQL/ODBC (today) to mysql-4.1.9-win32 and MyODBC-3.51.10-2-win I began to get the Catastrophic Failure error when trying to connect to MySQL.

I just now applied the above patch MyODBC-3.51.10-2-patch3.zip and presto everything is happy and joyous now. I didn't restart the machine, just closed MySQL apps so that DLLs replaced by this patch weren't in use. 

-Dmitri
Fog Creek Software
[3 Feb 2005 17:23] Dmitri Kalmar
(that's "when I upgraded" with a "d" on the end)
[8 Feb 2005 17:51] Shaun Carney
the patch on this thread produced the same error except when I removed the default database. Only then am I able to connect to crystal via ADO. Thanks!
[11 Feb 2005 19:20] Peter Harvey
Using 3.51.11 should solve this problem.
Support - please consider closing.
[8 Jun 2005 12:27] Emmanuel KARTMANN
I'm experiencing the same error (0x8000FFFF Catastrophic failure) from time to time WITH MySQL 4.1.12 and MyODBC 3.51.11 (connecting from ASP/Javascript via ADO). Once the error occurs, there is NO WAY to make new connections.

Restarting IIS solves the problem - but is unacceptable on a production system...

Please help!

E.

Email: emmanuel.kartmann@lutecia.info
[5 Dec 2005 10:56] Arnar Birgisson
I'm having the same problem on Windows XP SP2 with MyODBC 3.51.11, trying to connect to MySQL 4.1.15 running on a linux 2.4 machine.
[2 Jun 2007 23:05] Cesar Bustamante
I have the same problem with the latest MyODBC Driver (3.51.15). When I like to connect with a MySQL Engine (5.0.41) through ADO  with the MyODBC provider appears the following error: ADO Error: Catastrophic failure. How i can resolve this problem? is there any patch to this driver? Thanks and sorry about my english...
[8 Dec 2011 12:42] Kunal Das
my application is running fine on Win-xp ; VB 6 connecting with Mysql Back end ; But it is giving Catasrophic failure in Windows 7. Can any one give the Solution.
[25 Sep 2012 11:57] frederick Godson
Oracle is a nice ICT Company known worldwide. Their ideas are in use at http://unn.edu.ng/units/management-information-systems-mis
[11 Feb 2013 14:12] Mercy Wunmi
FEDERAL UNIVERSITY OYE EKITI   www.fuoye.edu.ng

Applications are invited from suitably qualified candidates to fill the position of Senior Lecturer, Lecturer I and Lecturer II in some Faculties/Departments of the Federal University Oye-Ekiti.

for more information see  http://www.fuoye.edu.ng/site-news/219-vacancy-placement