[Qt-interest] SQL transactions on QSqlQueryModel/QTableView

Marcelo Estanislau Geyer estanisgeyer at hotmail.com
Fri Jun 12 03:25:25 CEST 2009


Hi,

So, this is not good if true. I realized that if I finish a transaction
and if there more records to be searched in the database, these records
will not be searched, the roll of the scroll tableview.

Thanks,

Marcelo E. Geyer

From: tony.rietwyk at rightsoft.com.au
To: qt-interest at trolltech.com
Date: Fri, 12 Jun 2009 09:53:16 +1000
Subject: Re: [Qt-interest] SQL transactions on QSqlQueryModel/QTableView






Message





Hi Marcelo, 

 
I use FB and 
set the transactions using the QSqlDatabase methods.  I only use 
QSqlQuery.  
 
Note there 
used to be a design bug in the Qt classes related to SqlTable.  It holds an 
edit query, and reuses it if the generated update statement is the same.  
But there is no mechanism for the driver to tell the edit query that the 
previous transaction has finished and another one started. This causes the 
useless 'a system error has occurred message' from fb, because it cannot handle 
queries open across transaction boundaries.  I'm not sure whether that can 
affect QSqlQueryModel as well.  
 
Good 
Luck!  
 
Tony. 

 
 

  To supplement, I'm using the Firebird database and to change the 
  transaction type to "snapshot" in a SELECT. The QT documentation says little 
  about it.

Thanks for help.
Marcelo E. Geyer


Hi 
  guys,

How best to work with transactions with QSqlQueryModel and 
  QTableView? My question is how and when the commit call as appropriate, since 
  the QTableView is doing a fetch from the 
  database.

Thanks,

Marcelo E. 
Geyer
Brazil
_________________________________________________________________
Deixe suas conversas mais divertidas. Baixe agora mesmo novos emoticons. É grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090612/8cd0f045/attachment.html 


More information about the Qt-interest-old mailing list