Results 1 to 6 of 6

Thread: QSqlQuery exec blocking function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Location
    Austria
    Posts
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default QSqlQuery exec blocking function

    hi,

    my problem is that the
    Qt Code:
    1. QSqlQuery::exec()
    To copy to clipboard, switch view to plain text mode 
    function is blocking my application when the network-connection is down.

    i tried to set the flag
    Qt Code:
    1. MYSQL_OPT_RECONNECT=1
    To copy to clipboard, switch view to plain text mode 
    with
    Qt Code:
    1. QSqlQuery::setConnectOptions()
    To copy to clipboard, switch view to plain text mode 
    but this doesn`t help.

    is there any workaround about this or what can i do to solve this problem?

    kind regards,
    reinki

  2. #2
    Join Date
    May 2009
    Location
    Austria
    Posts
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSqlQuery exec blocking function

    Can anybody help me with my problem?

  3. #3
    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: QSqlQuery exec blocking function

    You can first check if the network connection is down. Or put all database interaction in a thread.

Similar Threads

  1. Abort QSqlQuery::exec()
    By elmo in forum Qt Programming
    Replies: 5
    Last Post: 13th October 2013, 20:50
  2. Replies: 1
    Last Post: 18th July 2011, 12:12
  3. QSqlQuery.exec() weird error
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 25th May 2010, 13:02
  4. QSqlQuery and no response while exec()
    By jacek_ in forum Qt Programming
    Replies: 5
    Last Post: 5th November 2009, 08:47
  5. exec() not blocking, derived QDialog, Qt 4.4.3
    By wdezell in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2009, 18:56

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.