Results 1 to 6 of 6

Thread: SQLite database problem in some SO

  1. #1
    Join Date
    Nov 2010
    Location
    Cienfuegos, Cuba
    Posts
    16
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default SQLite database problem in some SO

    I wrote a simple program a few days ago and tested it in some computers without Qt installed. The program works fine. So I delivered the program to a client and he was unable to perform any action related with the database (SELECTs and INSERTs - The program is so simple!!!). I'm using a SQLite database and all the operations are made with QSqlQuery. The database has 3 tables (2 with the actual data and one for the relations). All the fields stores numbers except one that stores a string. The problem was identified in PCs (64 bits) with Win7 and in some WinXP Unnatended editions.

    There is some known problem with these SO and Qt+SQLite?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: SQLite database problem in some SO

    Did you remember to deploy Qt's sqlite driver on the target machine?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    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: SQLite database problem in some SO

    Did you remember to to test your deployment mechanism before giving to the customer?

  4. #4
    Join Date
    Nov 2010
    Location
    Cienfuegos, Cuba
    Posts
    16
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: SQLite database problem in some SO

    Yes, this deployment has been tested. I usually give to the client:

    data.db3
    app.exe
    qtcore.dll
    qtgui.dll
    qtsql.dll
    mingw.dll
    lib*.dll (another dll required in Qt 4.7)
    sqldrivers/qsqlite.dll

    I develop in Ubuntu 10.10, build Windows executables in WinXp SP3 with Qt4.7 (virtual machine) and test on WinXP SP2, WinXP SP3 and Win7 without Qt (these SO on virtual machines). Always works except in this case.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: SQLite database problem in some SO

    Does Qt report QSQLITE3 as an available sql driver?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    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: SQLite database problem in some SO

    Quote Originally Posted by anoraxis View Post
    Yes, this deployment has been tested. I usually give to the client:

    data.db3
    app.exe
    qtcore.dll
    qtgui.dll
    qtsql.dll
    mingw.dll
    lib*.dll (another dll required in Qt 4.7)
    sqldrivers/qsqlite.dll
    They are certainly not the names of the DLLs on my Windows machines. I will assume you have shipped the correct files, i.e. QtCore4.dll, qsqlite4.dll etc.

    If data.db3 is your database and it has been installed under the user's Program Files folder with the app it will not generally be writeable on Windows Vista, 7, or 8.
    If you are assuming that data.db3 is in the current working directory of the application then it may fail in other environments.

Similar Threads

  1. Replies: 0
    Last Post: 21st February 2012, 17:20
  2. Sqlite Database
    By sabbu in forum Qt Programming
    Replies: 5
    Last Post: 16th May 2011, 14:07
  3. sqlite database problem
    By palinko1111 in forum Qt Programming
    Replies: 3
    Last Post: 4th May 2011, 08:04
  4. Load a new Sqlite database problem
    By beware in forum Qt Programming
    Replies: 15
    Last Post: 24th January 2011, 10:05
  5. QT & Sqlite problem: "database is locked"
    By xfurrier in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2009, 08:06

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.