my understanding, it that is all in a journal file and if it “crashs” that file vanishes and it is as if nothing happened
but when the transaction completes, that journal file is “commited”
But I have code in the unhandled exception handler, so the app does not vanish if an unhandled exception occurs… it just cuts the process it was doing…
I think have read that uncommited write operations DO lock the db…
Once you “BEGIN TRANSACTION”, the db will be locked on CubeSQL for other writers, as there can be only 1 concurrent writer.
So if you handle exceptions, you’ll have to “ROLLBACK” or “COMMIT”.
Another way of “unlocking” is of course to close the connection (or let the database-object go out of scope so that it closes / or quit the application entirely).
try
BEGIN TRANSACTION
'all ok
COMMIT
catch error
'we don't want to commit this unfinished transaction
ROLLBACK
end try