Search code examples
vb.netodbc32bit-64bitibm-midrange

ODBC Error: Driver not capable


I'm establishing an ODBC connection to our AS/400 in an app I'm developing. It simply does a DELETE and then an INSERT. Nothing crazy or complicated. Everything works great on my 64-bit Windows 7 Pro desktop (UPDATE: no longer true) but when I try to run the app on my 32-bit laptop for a presentation, I get the following error:

ERROR [S1C00] [Micro Focus][Rumba Data Access][S1023934]Driver not capable. SQLSetConnectOption ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000][Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that tha pplication requested (see SQLSetEnvAttr). ERROR [08004][Micro Focus][RUMBA Data Access][S1023934]Data source rejected establishment of connection. APPC Primary RC = Allocation_Error; Secondary RC = Allocation_Failure_No_Retry.

I'm not sure what's going on. I may have messed something up when setting up the DSN on the 32-bit laptop but it looks exactly the same as what I set up on the 64-bit desktop... Is there something different between the 32-bit and 64-bit versions or is there something else going on?

Thanks!

EDIT: I just tried it on another 64-bit desktop and I got the same error. There must be something wrong with how I'm setting up the DSN since I set it up on my machine months ago and could be forgetting something.

EDIT2: I ran Windows Update on the desktop where everything worked on and now it doesn't work there either. Is it possible a buggy Windows Update could be causing my issues?

EDIT3: I was asked in the comments to enable tracing and see what happens. Skimming through it, here are a few notable messages:

EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)

and:

EXIT SQLGetDiagRecW with return code 100 (SQL_NO_DATA_FOUND)

Everything else looks like it exits with a status of 0 (SQL_SUCCESS)


Solution

  • The issue was resolved by installing this Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update.

    According to Microsoft,

    A security issue has been identified leading to a vulnerability in MFC applications that are built with Visual Studio 2005 and ship the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package.

    Why installing a security patch (rather than a bug fix patch) solved this is beyond me...