Results 1 to 2 of 2

Thread: QSQLDatabase - Install QODBC (NOT MYSQL, but SQL Server 2008 R2 or Express)

  1. #1
    Join Date
    Sep 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Exclamation QSQLDatabase - Install QODBC (NOT MYSQL, but SQL Server 2008 R2 or Express)

    Hi,

    I've been trying to open a connection to my database, but it says the following:
    Qt Code:
    1. QSqlDatabase: QODBC driver not loaded
    2. QSqlDatabase: available drivers: QSQLITE
    To copy to clipboard, switch view to plain text mode 

    So I try to find a forum that explains how to install SQL Server connection ODBC with QT, but I only get MySQL results and that's not what I want.

    I want to connect to my SQL Server or Express (can install the express if needed.) to my application.

    HOW to install QODBC on Qt 4.8 (not 4.1,4.2,4.3 ... it doesn't work.)

    Thanks!
    Last edited by xboxnissan; 11th November 2011 at 22:18.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QSQLDatabase - Install QODBC (NOT MYSQL, but SQL Server 2008 R2 or Express)

    You follow the instructions to build the ODBC plugin for Qt. Your source code location may be different if you are using the SDK rather than standalone sources. Works out-of-the box with Microsoft VS. For the bundled MingW compiler substitute mingw32-make in place of nmake. Run "nmake install" after the compilation to put the plugin in the correct location.

    These instructions haven't changed since at least 4.5 and probably not since 4.0.

Similar Threads

  1. Trying to Install Qt 4.5 on Vista32 with MSVC++ 2008 Express: and Failing
    By GregMalick in forum Installation and Deployment
    Replies: 9
    Last Post: 30th June 2010, 06:35
  2. QSqlDatabase: QODBC driver not loaded
    By gutiory in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2010, 09:24
  3. Replies: 3
    Last Post: 8th April 2010, 20:42
  4. How to connect to ms sql server 2008 EXPRESS?
    By csoapy in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2010, 19:22
  5. QSqlDatabase::open() fails with QODBC
    By grzywacz in forum Qt Programming
    Replies: 4
    Last Post: 7th April 2010, 03:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.