Created
April 16, 2013 13:54
-
-
Save maltzsama/5396071 to your computer and use it in GitHub Desktop.
android sqlite with transaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.beginTransaction(); | |
| try { | |
| //Função de inserção. | |
| saveTest(); | |
| db.setTransactionSuccessful(); | |
| }catch { | |
| //Alguma falha da transação | |
| }finally { | |
| db.endTransaction(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment