Results 1 to 3 of 3

Thread: SQLLITE Support Needed but it is there by default? What am I missing?

  1. #1
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default SQLLITE Support Needed but it is there by default? What am I missing?

    I am using QT4.6 on a Mac running Leopard.

    I am just finishing running through the examples. All of them run perfectly fine for me. So I decide to start with a new project from scratch and use some of the example code as a starting point. It compiles, but then I get an error that states "Unable to Establish database connection. This examples needs SQLite support. Please read the Qt SQL Driver documentation for information how to build it"

    Now before you tell me that I need to build the plug-in, I am using the same connection.h file that is in the examples, and when I took out the call to createConnection in my main program and add a call to QSqlDatabase::drivers() to see which drivers are available I get back
    Starting /Developer/CartelCode/CreatDatabase/CreateDB/CreateDB...
    MIN
    QSQLITE
    QODBC3
    QODBC
    QPSQL7
    QPSQL

    It seems like there is something that is not set in the project, but I don't know where. Every time I search on this error it is because someone didn't build the DB....but SQLite is built and the program states that it is available.

    I made sure I have all the same libraries loaded in my programs, the only thing I can think of at this point is that maybe my .pro file is not right, could this be it? Here is what mine looks like
    QT += network \
    opengl \
    sql \
    script \
    svg \
    webkit \
    xml \
    xmlpatterns \
    phonon \
    qt3support \
    testlib \
    dbus
    TARGET = CreateDB
    CONFIG += console
    CONFIG -= app_bundle
    TEMPLATE = app
    SOURCES += main.cpp
    HEADERS += connection.h

    Thanks in advance for any info any one can offer.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: SQLLITE Support Needed but it is there by default? What am I missing?

    Show us some code and make sure you have set the right path to the database file.

  3. The following user says thank you to Lykurg for this useful post:

    theMac (1st May 2010)

  4. #3
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: SQLLITE Support Needed but it is there by default? What am I missing?

    Ok, as I was pasting code in I saw where that error is being generated....I'm an idiot.

    You mentioning the path to the file made me check the part where I create the DB file and I realized I made a type-o in that path so the directory didn't exist, thus the error.

    Thanks.

Similar Threads

  1. Says I am missing a .dll file that is there
    By bijan311 in forum Newbie
    Replies: 12
    Last Post: 28th February 2010, 11:29
  2. QWT is missing files
    By Jore in forum Newbie
    Replies: 4
    Last Post: 18th February 2010, 15:28
  3. Missing tileVertically()
    By zarkzervo in forum Qt Programming
    Replies: 2
    Last Post: 3rd November 2009, 07:01
  4. QTableView and SqlLite
    By Myrgy in forum Qt Programming
    Replies: 1
    Last Post: 4th October 2009, 14:54
  5. libQtGui_debug.so.4 missing
    By fwohlfert in forum Installation and Deployment
    Replies: 2
    Last Post: 5th October 2006, 19:07

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.