Problem Activating SQL Drivers
-
Hi,
I hope all of you will be fine.
I have started QT a couple of days ago and I am finding problem in activating ODBC and MySql drivers for QT. I want to use SQL Server or MySQL as RDBMS for the application I am developing in QT.
I have tried both ways(configure and manual build) to activate the ODBC and MySql drivers but can't get through.
When using 'configure -qt-sql-odbc' in QT Command Prompt, this command configures successfully, after this I enter 'mingw32-make', it takes a lot of time and ends with some module fail mesage.Thanks in advance for anykind of help. Waiting for your response.
Regards
Khalid Mushtaq -
http://www.easysoft.com/developer/libraries/qt/odbc.html
http://ga.maral.me/post/1705473515/building-and-deploying-qmysql-on-windows-with-mingw
http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/
Take a look at those links and see if that helps, I had a very hard time compiling SQL into qt as well and the bottom two links basically pointed me in the right direction Hope this helps
-
Thanks for the help. I will come back after applying it.
-
I have read these links but the problem is that I use QTSDK 1.1 and these articles use older version of QT than QTSDK 1.1 I can't find any directories that these articles denote. I can't find QT command prompt in QTSDK 1.1 , I want to know where is the QT command prompt in QTSDK 1.1
Thanks for the help.
-
what environment are you developing on?(ie, which os) Though the links i provided are dated I would imagine the process works the same way( though I can not say for sure). if you simply do a system search for qt command prompt you should find it. Most of the instructions I have on those links refer to windows xp, but i followed them and got it to work with windows 7. Earlier releases of qt allowed you to navigate to the command prompt in the IDE, though to my knowledge( as i have not found it yet) qt creator 4.7 does not directly allow you to access it. Simply because it is a bad idea to be able to modify in both at the same time. If you manage to locate the qt cmd, the commands will be the same as in the articles above.
-
I am using Windows XP.
I uninstalled the QT SDK 1.1 and installed the previous version. Here I found QT command prompt. but no 'reimp' command is there. I googled about it and came to know that it is the part of the mingw-utils, I downloaded it but same result. Where to find reimp command?
-
Thanks Andre. It worked.
Now the problem is that when I use addDatabase("QMYSQL") it returns
'QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC'.Can you please tell me how to use QODBC to connect to SQL Server? Currently I am using this.
@
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setHostName("khalid-maak\SQLEXPRESS");
db.setDatabaseName("madheef");
db.setUserName("sa");
db.setPassword("khalid");
@but it returns
'Data Source not found and no default driver specified ODBC3: Unable to connect'EDIT: please use @ - tags for code highlighting, I added them in this post. Gerolf
-
Can anyone please tell me how to use mysql or ms sql server with qt.
I use QT SDK 1.1Any Help will be appreciated.