Topic: MySQL Transaction

Hello Derek, family,
Please, how do I use transaction in MVD using MySQL database. Thank you.

@thezimguy

2 (edited by brian.zaballa 2020-08-10 05:52:31)

Re: MySQL Transaction

Just use the Transaction statement START TRANSACTION and COMMIT e.g

try
    SQLExecute('START TRANSACTION');
    ...
    ...
    ...
    SQLExecute('COMMIT');
except
    SQLExecute('ROLLBACK');
end;

It will depend on how your script works or how you want it to work. You may want to add START TRANSACTION statement on the OnClick Procedure of the button, then the COMMIT on the AfterClick Procedure. You can attach some project here, what you want to do with Transaction and someone will give you workarounds. Cheers.

brian

Re: MySQL Transaction

Thank you

@thezimguy