Subject Re: [firebird-support] Re: Problem with my first stored procedure
Author Dimitry Sibiryakov
On 19 Apr 2005 at 16:05, Helen Borrie wrote:

>Dimi is mistaken when he tells you not to test for InTransaction. It

Helen, if you want to shorten my name, 'Dima' is a right form.

>doesn't eat anything; and an exception will occur if one attempts to
>call the Commit method on a transaction object that is not

It eat some CPU cycles for call, though the check inside is really
short. The code with all these checks look ugly (unclear at least)
from my POV.
And anyway, the exception will occure earlier, when one attempts to
call Prepare or ExecProc using transation object which is not
InTransaction. If execution flow reaches this check, transaction is
InTransaction for sure. My usual code looks like this:


>Firebird-support isn't a Delphi support list....

That's right. But though traffic is rather big, some advice
regarding programming style is always good just because customer may
be too lazy to get to mail-list where it is in-topic.
SY, Dimitry Sibiryakov.