Search code examples
pythoncx-oracle

Python cx_oracle GetOverlappedResultEx could not be located in kernel32.dll


I am trying to use cx_Oracle to connect to a database and am getting this error at the point in the code when I issue the cx_Oracle.connect statement. I am running windows 7 and have tried with both 32 and 64 bit versions of python and the corresponding Oracle Instant Client versions.

If I run through Visual Studio Code I dont get this error but I get the error "DPI-1050: Oracle Client library is at version 0.0 but version 11.2 or higher is needed". I spent quite some time checking for possible solutions and following the suggestions posted (this one for example) but with no luck.


Solution

  • The GetOverlappedResultEx WinAPI function is new in Windows 8.

    As such, this means that your copy of cx_Oracle (or some DLL that it links against -- perhaps the Oracle client library) does not support your version of Windows.

    (btw kudos to package authors for such a helpful error message)