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

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
fdoliveira
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 18.11.2005, 15:40
Location: Caicó/RN

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

Post 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
darkbrain
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 28.12.2005, 11:56

Post by darkbrain »

fdoliveira
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 18.11.2005, 15:40
Location: Caicó/RN

Why StartTransaction don't work

Post 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
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post 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
fdoliveira
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 18.11.2005, 15:40
Location: Caicó/RN

Post by fdoliveira »

Hi Ben,

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

Best regards,
François Oliveira
Post Reply