Results 1 to 7 of 7

Thread: QSQLITE database changes not showing up in database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2013
    Posts
    71
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSQLITE database changes not showing up in database

    Quote Originally Posted by wysota View Post
    And what does QSqlQuery::numRowsAffected() return?
    Returns the correct number of rows affected...

    After doing some manual debugging i've seen the following in application output when I change between the windows that connect to the different databases.

    QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
    QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_connection', old connection removed.
    Looks like its using the same connection for the two dbs not sure what to actually change though because when I tried changing something it gave me an error saying " Driver not loaded"....
    Last edited by Cyrebo; 14th April 2013 at 22:19.

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

    Default Re: QSQLITE database changes not showing up in database

    If you want help then provide something we can compile and test. Otherwise you're on your own.
    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
    Feb 2013
    Posts
    71
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSQLITE database changes not showing up in database

    It's working now! I hadn't set the default db value that was being updated to 0 like I did in the one that's working lol...smh

    P.S. Found that out while I was preparing to upload all my code.
    Last edited by Cyrebo; 14th April 2013 at 23:27.

Similar Threads

  1. Replies: 3
    Last Post: 24th February 2013, 04:20
  2. QSQLITE database, delete rows, frozen columns
    By carvi in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2011, 02:11
  3. QSqlite, multiple connections to in memory database.
    By adzajac in forum Qt Programming
    Replies: 9
    Last Post: 10th March 2010, 22:35
  4. QSQLITE database can't exec queries
    By mcwar in forum Qt Programming
    Replies: 5
    Last Post: 12th January 2010, 23:47
  5. QSqlite database lock + Delegate + QSqlQueryModel
    By NoRulez in forum Qt Programming
    Replies: 0
    Last Post: 13th October 2009, 11:52

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