Results 1 to 5 of 5

Thread: Problems with QSqlQuery update

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with QSqlQuery update

    Quote Originally Posted by whoops.slo
    i use sqlite 3. i also think that select lock the table, i just wanted to be sure that i am not doing something wrong and that this is the correct behaviour of the qt and sqlite.
    I don't use SQLite, but probably you can use "PRAGMA read_uncommitted = 1" as a workaround, but beware.

    Quote Originally Posted by whoops.slo
    is it possible to do another select statement on the previously locked table but update would not work?
    Yes, SELECT acquires a SHARED lock which allows only reading, but UPDATE tries to acquire an EXCLUSIVE lock which can't coexist with any other locks, thus it fails.

  2. #2
    Join Date
    Jan 2006
    Location
    Kranj, Slovenia
    Posts
    34
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Problems with QSqlQuery update

    thanks, that is what i wanted to know. now everything makes sence and my speculation was correct.

Similar Threads

  1. Replies: 9
    Last Post: 7th November 2006, 15:10
  2. Auto update module
    By munna in forum General Discussion
    Replies: 3
    Last Post: 26th September 2006, 14:52
  3. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 21:09
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39
  5. Update a row
    By dragon in forum Newbie
    Replies: 9
    Last Post: 17th January 2006, 17:11

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.