On Tue, April 18, 2006 22:49, Luis Silva wrote:
>
> One more question, I'm changing my code because of the last problem  and
> i'm
> trying to use multiple transactions for the same connection. isn't it
> possible? i'm getting this error:
>
> Exception: Started transaction<READ COMMITTED> while transaction<READ
> COMMITTED> still active

Of course you can use multiple transactions on the same connection--but
not at the same time!  This has been discussed before: there wouldn't even
be a way for the backend to know which transaction a command was meant
for.

If you want to execute multiple independent transactions simultaneously,
just create multiple connections from the same connection string.  If you
use lazy connections, you can just create an array of them and whenever
you need one, just grab one that isn't in use yet.  With lazyconnection,
the actual connection to the backend is not established until you really
start using it.


Jeroen


_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to