[Lazarus] What is a TSQLTransaction and why do I need one?
Luca Olivetti
luca at wetron.es
Tue Nov 30 09:16:42 CET 2010
En/na Joost van der Sluis ha escrit:
> This can be done perfectly with sqldb. But which are the cases which are
> difficult?
When you have a visual database component (e.g. a dbgrid) that needs the
connection opened all the time (otherwise it wouldn't show any data) and
locks the database for other uses.
Mind me, it happens also with zeos when you select a
TransactIsolationLevel different than tiNone, but there you have the option.
An use case I have (but it's not the only one) is a dbgrid opened on a
read only query (i.e. just to show data), while all data modification is
done with a different connection (that signals a refresh to the display
one when data is changed).
I also don't understand the transaction model of zeos, so even if I'm
using it, when I need transactions I issue them explicitly
(DbConnection.ExecuteDirect('BEGIN')...DbConnection.ExecuteDirect('COMMIT')).
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007
More information about the Lazarus
mailing list