How to avoid auto commit with TPgSQL.execute
Posted: Tue 10 Nov 2020 10:16
Hi,
I might miss something, but I can't find any option to avoid auto commit when using TPgSQL.execute.
Let assume I have different methods using TPgSQL to update, delete or insert data to different tables and all using the same TPgConnection. And I want the caller of those methods or even the caller of the caller to decide when to commit or rollback the data.
How to achieve that?
I read about the AutoCommit property that is available for TPgQuery but with my small test it looks like even it's set to false, the execute method of TPGQuery does a commit. So, using TPgQuery instead doesn't looks like a workaround.
Appreciacte any advice.
Thanks
I might miss something, but I can't find any option to avoid auto commit when using TPgSQL.execute.
Let assume I have different methods using TPgSQL to update, delete or insert data to different tables and all using the same TPgConnection. And I want the caller of those methods or even the caller of the caller to decide when to commit or rollback the data.
How to achieve that?
I read about the AutoCommit property that is available for TPgQuery but with my small test it looks like even it's set to false, the execute method of TPGQuery does a commit. So, using TPgQuery instead doesn't looks like a workaround.
Appreciacte any advice.
Thanks