Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Solved]: QSqlError(-1, "", "") with SQLITE

    General and Desktop
    2
    2
    6607
    Loading More Posts
    • 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.
    • B
      BerndS last edited by

      Hi,

      any idea what could be wrong?

      @ db = QSqlDatabase::addDatabase("QSQLITE");
      qDebug() << db.lastError();@

      -> QSqlError(-1, "", "")

      The code is from my Symbian^3 App with SDK 1.1 (QT 4.7.2)

      I have added this in my .pro file:
      QT += sql
      QTPLUGIN += qsqlite

      thx

      EDIT: QSqlError(-1, "", "") seems to be the error code if there is no error :)
      I had an error in some SQL statement later in the code. Now it works fine.

      1 Reply Last reply Reply Quote 0
      • S
        stukdev last edited by

        Post solved.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post