Page 1 of 1

Questions about "I can't have control of transaction&qu

Posted: 30.12.2005, 21:06
by fdoliveira
In my first message I can't make question about the problem and the questios are:

1. Why setting AutoCommit to false generate exception when I StartTransaction?
2. How can I have control of transaction without setting AutoCommit true?


The first message:

Hello,

I have a problem when a use StartTransaction with ZeosDBO on PostgreSQL 8.1. When I try to use TZConnection StartTransaction procedure with false AutoCommit propertie I receive "Invalid operation in non AutoCommit mode" exception. If I change AutoCommit to true, the exception doesn't appear, but when I StartTransaction and, for example, insert a row first and delete another row as a second operation, if the second operation cause an error, my first insert operation don't rollback.

Best regards,
François Oliveira

Posted: 31.12.2005, 13:08
by darkbrain

Why StartTransaction don't work

Posted: 07.01.2006, 11:46
by fdoliveira
All message post on this forum don't explain the basic question,
Why StartTransaction don't work?

If StartTranaction work how is the propertie to set or method to call that make StartTransaction work correct?

François Oliveira

Posted: 07.01.2006, 15:25
by btrewern
I've looked at this previously and come to the conclusion that transaction control for Postgresql in zeos is quite broken. Currently I'm using TransactionIsolationLevel = tiNone and doing my own transactions calling BEGIN, ROLLBACK and COMMIT when needed.

When I have time I'd like to see if I could patch zeos so transactions work better but things like savepoints in 8.x and such complicate matters.

Regards,

Ben

Posted: 07.01.2006, 19:19
by fdoliveira
Hi Ben,

Thanks for your comments, now the problem was solved adding a little bit of code.

Best regards,
François Oliveira