Subject Re: [ib-support] connections and transactions with api
Author C R Zamana
Helen Borrie wrote:
> At 11:25 AM 19-09-01 -0300, C R Zamana wrote:
>
>
>> Hi!
>>
>> After using the esql/c for about 1 year I'm now (re)developing
>>our RDD interface again using the API: much more power!
>>
>> The question is: as long as I can have several connections, each
>>transaction is "attached" in the context of the connection where
>>it has been created?
>>
>> In othere words: transactions are "independent" of the
>>connection in where it has been opened?
>>
>
> No: a transaction always belongs to a specific client connection. In START TRANSACTION the client program gets a transaction handle and has control of that transaction until it issues a COMMIT or ROLLBACK. The server takes care of isolating one transaction from another according to the parameters passed by the client but it doesn't care (or store) which client owns the transaction.


Just one more thing: if the same client connects twice to
the same database, he/she can opens two transactions, one in each
connection. Then committing one doesn't affect the other, right?

By other hand, openning two transacions in the same database
and committing one of them also doesn't affect the other, I guess.

Thank you.
Best regards.

--
------------------------------------------------------------------------
zamana@... | "Emacs is a nice OS - but it lacks a good text
zamana@... | editor. That's why I'm using Vim. Anonymous
http://www.inso.com.br | http://www.vim.org/quotes.html
------------------------------------------------------------------------