I have a button which updates an SQLite database using BeginTransaction and EndTransaction.
This phone is slow and it is easy to click on the button again before the previous transaction is complete.
When doing so, the app crashes:
I could implement locks or use Try/Catch but I wanted to know if there was a more direct way to check if a transaction is in progress?
This phone is slow and it is easy to click on the button again before the previous transaction is complete.
When doing so, the app crashes:
B4X:
java.lang.IllegalStateException: Cannot perform this operation because the transaction has already been marked successful. The only thing you can do now is call endTransaction().
I could implement locks or use Try/Catch but I wanted to know if there was a more direct way to check if a transaction is in progress?