- This topic has 1 reply, 2 voices, and was last updated 6 years, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Hi,
How can I use the same transaction for multiple orm methods? I saw that I can pass a transaction, but I don’t know how to obtain it.
Thanks in advance.
Kind regards,
Luigi
Hi,
var
tx:TkbmMWTransaction;
begin
tx:=TkbmMWTransaction.Create;
try
tx.StartTransaction;
try
ORM.Insert(data,…,tx);
ORM.Insert(data2,…,tx);
tx.CommitTransaction;
except
tx.RollbackTransaction;
end;
end;
best regards
Kim/C4D