Problem with Qt SDK 1.1 and SQL drivers



  • I installed Qt SDK 1.1 and I noticed that (in Desktop version on Windows) there are only SQLite drivers available by default. How is this possible? And how can I get ODBC driver too?



  • [quote author="Tiansen2" date="1304680113"]And how can I get ODBC driver too?[/quote]
    Get the "source":http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.zip and you can compile the driver yourself.



  • OK, if I go into odbc directory and run qmake, and then mingw32-make, it does not find some headers. How can I fix this to build only ODBC plugin or should I configure and build whole Qt?

    However, this is the first Qt SDK version where there is no ODBC plugin pre-built already.



  • See this thread.

    Basically you need to download the MySQL ODBC driver library, the MySQL header files and then convert the dll library to a mingw compatible format using reimp and dlltool.



  • Thread that you mentioned is not clickable. Can you give a link to thread again, please?





  • Thread that you mentioned is not about ODBC plugin, but about Mysql plugin.



  • Weird that you don't have the ODBC drivers. I have installed the SDK on windows too, and I do have them. You should not need to compile the ODBC drivers yourself. It is one of the two SQL drivers delivered by default. Are you absolutely positive you don't have them?



  • Path: C:\QtSDK\Desktop\Qt\4.7.3\mingw\plugins\sqldrivers
    (desktop)

    I have following files in that path:
    libqsqlite4.a
    libqsqlited4.a
    qsqlite4.dll
    qsqlited4.dll

    I also get message that available drivers are only 1: sqlite

    It seems very strange to me too, this is fresh install of Qt SDK. I chose Custom install when installing but I have not change nothing significant.



  • Hmmm... you are right. They are not there anymore. I did not notice, because I do compile my own drivers anyway (one of them based on the Qt ODBC driver). That is quite strange. Why would the ODBC drivers not be distributed with the SDK anymore?

    Edit:
    Note that I have no issues compiling my own driver, which includes all Qt ODBC driver code. No missing headers or anything like that.



  • I succeeded to build ODBC plugin manually and now my program works. Strange indeed.



  • I am new to using QT. I need to build the ODBC plugin on my windows7 box.
    I have QT4.6.3 installed. What are the steps I need to build the plugin.
    Do I need to use MinGW? Do I need to install and complie anything else to talk to my MSSQL db?

    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.