Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. ODBC driver not loaded but ODBC is available according to QSqlDatabase class
Forum Updated to NodeBB v4.3 + New Features

ODBC driver not loaded but ODBC is available according to QSqlDatabase class

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qsqldatabaseodbc
2 Posts 2 Posters 1.5k Views
  • 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.
  • C Offline
    C Offline
    cristiano.narcisi
    wrote on 26 Mar 2016, 22:46 last edited by
    #1

    Hi all i'm Cristiano
    i'm trying to read an xls file for handling its content and put it as i prefer. As suggested in the documentation , i'm trying to use the SqlDatabase object with the "ODBC" driver. I hence had downloaded the qtbase source code for my qt version, i have compiled the plugin using the unixODBC libraries and all has gone well. I have then copied the libqsqlodbc.so in the right position and now i can see a new driver in my project. The probelm is very strange: when i call

    QSqlDatabase::addDatabase("QODBC")
    

    the console shows me this strange message:

    QSqlDatabase: QODBC driver not loaded
    QSqlDatabase: available drivers: QSQLITE QSQLITE3 QODBC QODBC3 ...
    

    what's the problem?

    P.S.: i'm using Qt5.5.1 on a unix 32 bit machine.

    Thanks to all

    Regards

    Cristiano

    1 Reply Last reply
    0
    • H Online
      H Online
      hskoglund
      wrote on 27 Mar 2016, 01:37 last edited by
      #2

      Hi, I got the libqsqlodbc.so plugin to load successfully, I think it was last year with Qt 5.2 or 5.3, but I remember I had same kind of difficulties because the libqsqlodbc.so plugin is depending on libodbc.so being in the correct place. You could check with
      ldd libqsqlodbc.so
      to see what .so files are missing..

      1 Reply Last reply
      0

      1/2

      26 Mar 2016, 22:46

      • Login

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