Results 1 to 2 of 2

Thread: Error connecting to Oracle database

  1. #1
    Join Date
    Aug 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Error connecting to Oracle database

    HI everybody,
    I use Microsoft windows Vista 32 bit, I installed Qt SDK 2010.04 4.7.0 (32 bit) Open source, I installed oracle 10g express.

    I did an application that needs a database connection. So I had to compile the OCI driver to connect to the database.
    So I did like this:
    I open the Qt command Prompt.
    And I typed:

    Qt Code:
    1. set INCLUDE=%INCLUDE%;C:\oraclexe\app\oracle\product\10.2.0\server\OCI\includ
    2. set LIB=%LIB%;C:\oraclexe\app\oracle\product\10.2.0\server\OCI\lib\MSVC
    3. set PATH=%PATH%;C:\oraclexe\app\oracle\product\10.2.0\server\BIN
    4. set PATH=%PATH%;C:\Qt\2010.04\bin
    5. set PATH=%PATH%;C:\Qt\2010.04\mingw\bin
    6. set PATH=%PATH%;C:\Qt\2010.04\qt\qmake
    7. set PATH=%PATH%;C:\Qt\2010.04\qt\bin
    8. set ORACLE_HOME=C:\oraclexe\app\oracle\product\10.2.0\server
    9. set QT_PLUGIN_PATH=C:/Qt/plugins/sqldrivers
    10. cd C:\Qt\2010.04\qt\src\plugins\sqldrivers\oci
    11. qmake -o Makefile oci.pro
    12. mingw32-make
    To copy to clipboard, switch view to plain text mode 

    I don't know if my compilation is correct or not...!!
    But when I execute my program, it appears this message to me:
    Qt Code:
    1. QSqlDatabase: QOCI driver not loaded
    2. QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
    To copy to clipboard, switch view to plain text mode 
    I don’t know why the OCI driver is not loaded!!
    Help plzzz
    Thanks

  2. #2
    Join Date
    Jul 2013
    Posts
    8
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Error connecting to Oracle database

    Hey,
    After compiling the driver you get both release and debug versions,...that is if you compiled them both. Now you need to copy these four files files(including the .lib) file to the folder plugins/sqldrivers ...in the Qt directory. Then the QT framework will not complain anymore. Infact in that folder you have other compiled drivers as well.

    Good luck

Similar Threads

  1. Error compiling oracle oci driver for Qt database
    By NAYZAKAY44 in forum Qt Programming
    Replies: 0
    Last Post: 25th August 2010, 18:13
  2. Oracle Database Connection
    By ToddAtWSU in forum Qt Programming
    Replies: 6
    Last Post: 20th December 2007, 15:18
  3. Connecting to Oracle from QT App
    By KaptainKarl in forum Qt Programming
    Replies: 2
    Last Post: 17th August 2007, 08:06
  4. Oracle database <=> Qt4/Opensource
    By windkracht8 in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2007, 23:12
  5. Oracle Database Problem
    By magikalpnoi in forum Qt Programming
    Replies: 3
    Last Post: 27th September 2006, 21:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.