> how can i use this with my for loop.
>
> can anybody help me?

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#beginTransaction%28%29

On May 9, 10:29 am, Hitendrasinh Gohil <[email protected]>
wrote:
> hi,
>
> currently i am using below to add data to table but it takes too much
> time.
>
> for (int i = 0; i < Utility.TrackList.size(); i++)
>                                                 {
>                                                         
> db.InsertIntoNowPlaying(
>                                                                         
> Utility.TrackList.get(i).getTrackId()
>
> }
>
> somewhere i found this pseudocode
>
> accepted
>
> You should do batch inserts.
>
> Pseudocode:
>
> db.startTransaction();
> for (entry : listOfEntries) {
>     db.insert(entry);}
>
> db.setTransactionSuccessful();
> db.commit();
>
> how can i use this with my for loop.
>
> can anybody help me?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to