using transaction on several tables

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

using transaction on several tables

Post by jkuiper » Thu 17 Sep 2009 09:25

I have a class witch have an execute procedure. On this procedure different tables will be inserted / updated / deleted. If something is wrong the whole procedure will be rolled back.
I know TMyQuery.Session.Starttransaction will start an transaction on one table. But how do I start an transaction on several tables?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 18 Sep 2009 07:07

You should use the TMyConnection.StartTransaction method to begin a new transaction against database server. This method starts a transaction for all changes.

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Fri 18 Sep 2009 10:07

Okay, thanks :D

Post Reply