QOCIDriver: unable to create environment

  • Hi,

    I’m trying to move my application to 64 bits. That’s why I build qt4.7.3 with the VS2010 ×64-compiler. I’ve used -qt-sql-oci in the configuration because I need a connection to an Oracle DB. As includes, I took the oci.lib and oci.h from the same instant client sdk where I get the oci.dll from.

    When I look at QSqlDatabase::drivers() it says “QSQLITE QOCI8 QOCI” so I guess, QSqlDriver did compile with oci.

    But the moment I run QSqlDatabase::add(“QOCI”) there is an error:
    Warning: QOCIDriver: unable to create environment
    and lastError() says: Unable to initialize.

    isValid() returns true, though.

    I’ve already checked QApplication::getLibraryPath and made sure, the oci.dll is in the correct Folder but no success.
    I added the path of the original location of oci.dll to PATH – nothing.

    I’m going crazy. In 32-bits version everything went smooth, but in 64 bits…

    Any help is greatly appreciated.

    Kind regards,

Log in to reply