Can't perform operation on inactive transaction when rollback
Posted: Thu 29 Dec 2016 11:39
I use TPgQuery with CachedUpdates=True and AutoCommit = False.
I want to send changes to database, run some additional checks and rollback transaction if checks fail
When I tried this code:
i had received an error "Can't perform operation on inactive transaction" on session rollback. I suspect that PgDac dataset makes commit after each statement in transaction, despite AutoCommit = off in dataset options
I use last trial version of PGDac
I want to send changes to database, run some additional checks and rollback transaction if checks fail
When I tried this code:
Code: Select all
PgQuery1.ApplyUpdates;
//Here will be some additional checks...
connMain.Rollback;
I use last trial version of PGDac