How Do I Implement Transactions with ISAM Files? (Magic xpa 3.x)
When you are using an ISAM DBMS, Magic xpa will support transactions similarly to how it does for a SQL DBMS. That is, when you set Task Properties->Data->Transaction Mode and Transaction Begin, the proper transaction requests will be sent to the ISAM DBMS.
However, with ISAM files you also have the option of turning the ISAM transactions on and off globally. That is, the transactions can be turned on in some tasks, but turned off for the entire application and the task transactions setting will be ignored.
-
To turn ISAM Transactions on globally, set Options->Environment->Multi-User->ISAM Transactions to Yes.
-
Alternatively, you can change this directly in the Magic.ini file, as
ISAMTransaction = Y
If you have ISAM Transactions turned on, then you have the additional option of setting Force Locking Within Transactions on or off.
If Force Locking Within Transactions is Yes, then whenever you specify a Locking Strategy that isn’t “None” (Immediate, On Modify, Before Update), you must enter a Transaction begin that isn’t “None”. In other words, you can’t lock the record unless there is a transaction active.
If you do set a locking strategy but no transaction begin, then you get a syntax error when you check the program.