• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database commit

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I am inserting records into table but how to commit the inserted records.
Because it shows the records in List after some Navigation.

Thanks
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chetan dhumane wrote:I am inserting records into table but how to commit the inserted records....


Read up on android.database.sqlite.SQLiteDatabase class. It provides methods such as beginTransaction(), setTransactionSuccessful() and endTransaction() which can help here. You can nest your statements within a transaction block, depending on whether the transaction was sucessful or not your changes would be committed or rolled back.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic