May 6, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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?

11 replies

May 6, 2011

ucomesdag ucomesdag
Lab Rat
226 posts

Tiansen2 wrote:
And how can I get ODBC driver too?

Get the source [get.qt.nokia.com] and you can compile the driver yourself.

 Signature 

Write “Qt”, not “QT” (QuickTime).

May 6, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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.

May 6, 2011

s.frings s.frings
Lab Rat
30 posts

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.

May 6, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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

May 7, 2011

s.frings s.frings
Lab Rat
30 posts

http://developer.qt.nokia.com/forums/viewthread/655/

May 10, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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

May 10, 2011

Andre Andre
Robot Herder
6422 posts

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?

May 10, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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.

May 10, 2011

Andre Andre
Robot Herder
6422 posts

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.

May 10, 2011

Tiansen2 Tiansen2
Lab Rat
5 posts

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

May 16, 2011

arnie arnie
Lab Rat
3 posts

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

 
  ‹‹ [Help] Anybody have any success with Qt Static & Qt > 4.7.2      Windows 7 features such as TaskBarProgress? ››

You must log in to post a reply. Not a member yet? Register here!