I am looking for a way to specify a custom transaction level in Delphi's DBX using the firebird driver. I am using Delphi XE.
In the Parameter editor of the TSQLConnection component I can set various TransIsolation values and I'm using the default of ReadCommited
. The property WaitOnLocks
is set to True
.
I expect this uses the following firebird transaction configuration but I'm not sure:
READ WRITE + WAIT + SNAPSHOT
(see http://www.firebirdsql.org/refdocs/langrefupd20-set-trans.html)
I would like to use LOCK TIMEOUT [seconds]
instead of WAIT
. But I can't find how or where to specify this. I've looked in the DBX source files and there is some code for custom transaction levels (search for xilCUSTOM
) but it seems unfinished/unused.
The reason for this is that we sometimes experience a deadlock in our multi-user datasnap application and I think it's because one transaction is waiting on another (possibly dead) transaction. We would rather have the transaction break after a couple of seconds than have the whole client hangup indefinitely.