Subject Re: [firebird-support] Transaction Optoins
Author Helen Borrie
At 11:08 AM 5/06/2005 +0300, you wrote:
>I currently have this:
>
> _TxOpts =
> FbTransactionOptions.Concurrency | FbTransactionOptions.Read
> | (aNeedsToWrite ? FbTransactionOptions.Write : 0);
>
>These are from the .NET provider but I assume they translate directly to FB
>API constants.
>
>1) Elsewhere in the .NET provider it maps a .NET constant simply to
>Concurrency. Does Concurrency imply read and thus my addition of Read is not
>needed?
>
>2) Does concurrency also specify the write option? Ie its already
>read+write?

No. Isolation and read/readwrite are two different parameters of a
transaction, independent of each another.

"Concurrency" is an isolation level, another word for "Snapshot" or
"Repeatable Read". Other members of this paradigm are "Read Committed"
("ReadCommitted" in .NET?) and "Snapshot Table Stability" ("Consistency" in
.NET?)

Besides isolation, a transaction can be Read Only or Read-Write. I don't
know the .net interface too intimately, but it looks as if you have some
flag to set to indicate whether the transaction needs to be
read-write. Other interfaces tend to follow the engine's default, which is
read-write, with readonly by request.

There are other parameters for a transaction, too. Wait/NoWait; and, for
a ReadCommitted transaction, RecordVersion/NoRecordVersion. There's also
an optional Reserving clause that lets you take table locks, with various
sub-parameters to set up how the locks are to be respected by other
transactions. Carlos should be able to answer any questions about the .NET
provider's defaults and any peculiarities of implementation...

./hb