Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Oracle database connection failure
Forum Updated to NodeBB v4.3 + New Features

Oracle database connection failure

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 4 Posters 4.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Atiker
    wrote on last edited by
    #3

    I don`t know how to set up the environment. Here is the error message in Qt:
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
    "Driver not loaded Driver not loaded".

    JonBJ 1 Reply Last reply
    0
    • A Atiker

      I don`t know how to set up the environment. Here is the error message in Qt:
      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
      "Driver not loaded Driver not loaded".

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #4

      @Atiker
      You do not have the QOCI driver available, which is what you will need for Oracle. The above topics discuss this and what you have to do. My reading is that it does not come distributed with Qt (possible copyright reasons), and you have to build it yourself.
      https://stackoverflow.com/questions/17601662/how-to-build-qt-qoci-oracle-database-driver-on-windows-with-mingw
      Unless someone says otherwise....

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Atiker
        wrote on last edited by Atiker
        #5

        That article doesn`t work on my pc. Here is the mingw command line:
        C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set INCLUDE=%INCLUDE%;C:\app\aliati\product\12.2.0\dbhome_1\oci\include

        C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set LIB=%LIB%;C:\app\aliati\product\12.2.0\dbhome_1\oci\lib\msvc

        C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>qmake oci.pro

        C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>mingw32-make
        mingw32-make -f Makefile.Release
        mingw32-make[1]: Entering directory 'C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/oci'
        mingw32-make[1]: Nothing to be done for 'first'.
        mingw32-make[1]: Leaving directory 'C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/oci'

        C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>

        JonBJ 1 Reply Last reply
        0
        • A Atiker

          That article doesn`t work on my pc. Here is the mingw command line:
          C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set INCLUDE=%INCLUDE%;C:\app\aliati\product\12.2.0\dbhome_1\oci\include

          C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set LIB=%LIB%;C:\app\aliati\product\12.2.0\dbhome_1\oci\lib\msvc

          C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>qmake oci.pro

          C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>mingw32-make
          mingw32-make -f Makefile.Release
          mingw32-make[1]: Entering directory 'C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/oci'
          mingw32-make[1]: Nothing to be done for 'first'.
          mingw32-make[1]: Leaving directory 'C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/oci'

          C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #6

          @Atiker

          mingw32-make[1]: Entering directory 'C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/oci'
          mingw32-make[1]: Nothing to be done for 'first'.

          So, have you either looked to see what is already present in that directory, or made sure you've done a full "clean" before building? Why does it say nothing to be done for 'first'? You can look at the makefile.

          Or wait for someone else to come here and tell you exactly what to do.....

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Atiker
            wrote on last edited by
            #7

            Let me just reinstall Qt and try it again!:((

            JonBJ 1 Reply Last reply
            1
            • A Atiker

              Let me just reinstall Qt and try it again!:((

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #8

              @Atiker
              Worth a try :)

              Take this with a pinch of salt --- bearing in mind I know nothing --- but:

              set LIB=%LIB%;C:\app\aliati\product\12.2.0\dbhome_1\oci\lib\msvc

              Is that msvc at the end right for mingw? I thought msvc was for Microsoft VC libs? But don't get hung up on this, as it's only something which might look odd to me....

              1 Reply Last reply
              1
              • A Offline
                A Offline
                Atiker
                wrote on last edited by
                #9

                There is another error encountered :((
                C:\Qt\5.10.0\mingw53_32>cd C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci

                C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set INCLUDE=%INCLUDE%;C:\app\aliati\product\12.2.0\dbhome_1\oci\include

                C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set LIB=%LIB%;C:\app\aliati\product\12.2.0\dbhome_1\oci\lib\msvc

                C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>qmake oci.pro
                Cannot read C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/qtsqldrivers-config.pri: The system cannot find the file specified.
                Project ERROR: Library 'oci' is not defined.

                AnyHelp.exec();

                jsulmJ 1 Reply Last reply
                0
                • A Atiker

                  There is another error encountered :((
                  C:\Qt\5.10.0\mingw53_32>cd C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci

                  C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set INCLUDE=%INCLUDE%;C:\app\aliati\product\12.2.0\dbhome_1\oci\include

                  C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>set LIB=%LIB%;C:\app\aliati\product\12.2.0\dbhome_1\oci\lib\msvc

                  C:\Qt\5.10.0\Src\qtbase\src\plugins\sqldrivers\oci>qmake oci.pro
                  Cannot read C:/Qt/5.10.0/Src/qtbase/src/plugins/sqldrivers/qtsqldrivers-config.pri: The system cannot find the file specified.
                  Project ERROR: Library 'oci' is not defined.

                  AnyHelp.exec();

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @Atiker You can't use libraries for MSVC compiler with MinGW and other way around.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Atiker
                    wrote on last edited by
                    #11

                    Is there any other appropriate method to build QOCI driver?

                    1 Reply Last reply
                    0
                    • Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on last edited by
                      #12

                      @Atiker said in Oracle database connection failure:

                      Project ERROR: Library 'oci' is not defined.

                      Have you taken a look at this post?

                      Also this bug report may help you.

                      Just in case, have you have properly installed Oracle supporting libraries?

                      Upvote the answer(s) that helped you solve the issue
                      Use "Topic Tools" button to mark your post as Solved
                      Add screenshots via postimage.org
                      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      2

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved