[DUG] Sql query

Willie Juson willie.juson at satara.co.nz
Fri Jan 14 14:59:00 NZDT 2011


This issue may also be Database Transaction related. Depending on how your app is structured you need to be aware of which transaction(s) things are running within. For example (and somewhat simplified) the record-add you did may have happened in a different transaction to the one QToDo is assigned to, if the record-add transaction wasn’t committed then the new record would not be visible to other transactions, hence QToDo did not see this record. In this example closing your app may have automatically triggered the commit of the add-record transaction.
 
 
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of Marshland Engineering
Sent: Friday, 14 January 2011 12:50 p.m.
To: delphi at delphi.org.nz
Subject: [DUG] Sql query
 
I'm viewing a SQL query in a dbgrid. When I add a record to the source db and I run  QToDo.Refresh it does not include the new record in the dbgrid. If I close the application and re-run it, the record is displayed. 
 
Is refresh the correct property or is there something else. 
 
Thanks Wallace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110114/78e37f51/attachment.html 


More information about the Delphi mailing list