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. Problem Activating SQL Drivers
Forum Updated to NodeBB v4.3 + New Features

Problem Activating SQL Drivers

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 4.9k 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.
  • K Offline
    K Offline
    khalidmushtaq65
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • W Offline
      W Offline
      webmaster.skelton
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        khalidmushtaq65
        wrote on last edited by
        #3

        Thanks for the help. I will come back after applying it.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          khalidmushtaq65
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • W Offline
            W Offline
            webmaster.skelton
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              khalidmushtaq65
              wrote on last edited by
              #6

              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?

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

                You'll find reimp at the other end of a simple Google query that includes the keywords "reimp" and "gcc" or something along those lines...

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  khalidmushtaq65
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    khalidmushtaq65
                    wrote on last edited by
                    #9

                    Can anyone please tell me how to use mysql or ms sql server with qt.
                    I use QT SDK 1.1

                    Any Help will be appreciated.

                    1 Reply Last reply
                    0

                    • Login

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