On Sat, Mar 27, 2010 at 5:24 PM, Norbert Sendetzky <norb...@linuxnetworks.de
> wrote:

> Hi Mariano
>
> > - I open a connection (odbx_init and odbx_bind)
> > - send a query which starts the transaction. This query depends on the
> > database, but suppose something like "START TRANSACTION;"
> > - insert something
> > - close the connection (odbx_finish and odbx_unbind). Here I didn't do
> any
> > commit or rollback.
> >
> > Now, my question is, do the database client library finalize (rollback
> for
> > example) all the opened transactions to the database done with that
> > connection I am finalizing ? or do I explicitly rollback them ?
> > What happen with the insert of this scenario ?
> > Do this depends on the database client library ?
>
> Yes, the database server (!) rolls back the transaction if the connection
> is
> closed or lost. The inserted record isn't committed to the storage. The
> firebird backend is a little bit different, as it needs to explicitly roll
> back open transactions.
>

ok...thanks. I was quite sure about that....but not totally sure for
Firebird, thus my question :)


>
> > Do you think it is a good practice to explicitly rollback all opened
> > transactions when closing a connection ?
>
> No, not in Squeak as you don't know anything about the open transactions.
> In
> the case of firebird, leave that to the firebird backend.
>
>
So...the firebird backend (opendbx) takes care about that ? i don't have to
worry about that ?
correct?

Thanks!

Mariano



>
> Norbert
> --
> OpenPGP public key
> http://www.linuxnetworks.de/norbert.pubkey.asc
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> libopendbx-devel mailing list
> libopendbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
> http://www.linuxnetworks.de/doc/index.php/OpenDBX
>
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to