The problem is when i put ttsbegin and ttscommit before the update, i won't be able to get the value of the updated record.
I mean like this, i want to update the record then based on the values of the update i just did, i want to do some logic, Now with ttsbegin and ttscommit, the value of the record is still the old value so in the example below, i won't be able to info the new values that i just updated, as the table is still saving the old value which was true.
However if i remove ttsbegin and ttscommit, when i do the info i will get the new records i just updated but if any error happens before the info, the update won't be rolled back and if i check the table i will see the updated value even though the error happens.
I just put the info for example but i will do logic other than the info
try
{
ttsbegin;
Table table;
update_recordset table
setting field = false
where table.Id == enumerator.current();
throw error("error");
Table table1;
while select table1 where table1.field == false
{
Info(strFmt("%1",table1.field));
}
ttscommit;
}
catch
{
}