Results 1 to 5 of 5

Thread: Sql questions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 14 Times in 12 Posts

    Default Re: Sql questions

    Regarding your first question: At work (even though it's a plain vanilla win32api-app) we're using a timer to refresh our models and a locking mechanism to prevent two users from editing the same row. Other dbms (like mysql or pgsql) won't help you much there except for providing locking mechanisms you can use directly instead of having to invent your own.

  2. #2
    Join Date
    Mar 2006
    Posts
    140
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 4 Times in 3 Posts

    Default Re: Sql questions

    How about writing a little service / daemon or even just another thread that monitors connections on the db port (Does SQLite use a port). Whenever a connection is established, then signal your main program to do an sql refresh.
    You might need to consider waiting a bit, or repolling until you know the connection is finished before signalling.

    Just a thought.

  3. #3
    Join Date
    Dec 2006
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Sql questions

    The other problem I'm having is that calling select() via a timer is not updating the contents of the table. It appears only to update if the #row or #columns has changed in the database. Is there a way of forcing QSqlQueryModel (and derivatives) to update the table *contents* without subclassing?

    Thanks again,

    RobF

Similar Threads

  1. SQL problem
    By nimmyj in forum Qt Programming
    Replies: 4
    Last Post: 25th December 2006, 18:43
  2. Replies: 1
    Last Post: 4th October 2006, 16:05
  3. Connection with MS SQL
    By manish_pesit in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2006, 07:47
  4. 2 Questions about layouts
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2006, 13:54
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

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.