Results 1 to 3 of 3

Thread: Help,driver not loaded!

  1. #1
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Help,driver not loaded!

    I use the VS2005 and QT4.3.0,

    and i an sure that the file "qsqlodbc4.dl" is in the path "C:\Qt\4.3.0\plugins\sqldrivers"

    and the project is easy:

    Qt Code:
    1. #include <qtsql>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
    6. return 0;
    7. }
    To copy to clipboard, switch view to plain text mode 
    it can pass the linking , but when it run ,the qdebug show that "QODBC driver not loaded" and "available drivers : (nothing here)"

    i don't why this happy!

    someone can help me?
    Last edited by marcel; 25th December 2007 at 12:53. Reason: missing [code] tags

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help,driver not loaded!

    A QApplication object must be instantiated before using any of the Qt API or objects.
    Once you instantiate a QApplication object certain Qt internal things are setup.

    Try with:

    Qt Code:
    1. #include <QApplication>
    2. #include <qtsql>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7. QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
    8. return app.exec();
    9. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help,driver not loaded!

    thank you so much

    i am a beginner.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. exception at 0x65100c40 (QtGuid4.dll)
    By sabeesh in forum Qt Programming
    Replies: 11
    Last Post: 21st December 2007, 17:10
  3. My Mysql 5 and Qt 4.2.2 Problem (Driver not loaded)
    By fengtian.we in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2007, 08:11
  4. qodbc driver not loaded error in release mode
    By mandal in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2006, 09:42
  5. Loaded QT 4.1.1 and MinGW Compiler
    By Seth in forum Newbie
    Replies: 7
    Last Post: 8th July 2006, 15:03

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
  •  
Qt is a trademark of The Qt Company.