I have just downloaded the evaluation of MyDAC with the aim to upgrade a Delphi application from Interbase to MySQL.
The method in which Transactions are used appears to differ though. Based on the existing code, the translation should be:
Code: Select all
xTransaction := TMyTransaction.Create(nil);
xMyCommand := TMyCommand.Create(nil);
xMyCommand.Connection := MyConnection1;
xMyCommand.Transaction := xTransaction;
xTransaction.StartTransaction();
xMyCommand.SQL.Add('INSERT INTO TBL (A,B) VALUES ("1", "2")');
xMyCommand.Prepare();
xMyCommand.Execute();
xTransaction.Commit();Thanks,
James