Page 1 of 1

using transaction on several tables

Posted: Thu 17 Sep 2009 09:25
by jkuiper
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?

Posted: Fri 18 Sep 2009 07:07
by Dimon
You should use the TMyConnection.StartTransaction method to begin a new transaction against database server. This method starts a transaction for all changes.

Posted: Fri 18 Sep 2009 10:07
by jkuiper
Okay, thanks :D