Thanks Pepjin,

Unfortunately, Im targeting Android 1.6, so it's not possible to use
ContentProviderOperations...

On Nov 4, 2:36 pm, Pepijn Van Eeckhoudt <[email protected]>
wrote:
> Override ContentProvider#applyBatch, start a transaction on your
> database, apply all the operations and then commit (or rollback) the
> transaction. The default implementation delegates each operation to the
> corresponding ContentProvider method so you can probably do this as:
>
> startTransaction
> try {
>    super.applyBatch
>    setTransactionSuccesful
>
> } finally {
>    endTransaction
> }
>
> Pepijn
>
> On 03/11/2011 20:59, Fl vio Faria wrote:
>
>
>
>
>
>
>
> > Hi guys,
>
> > I have a ContentProvider in my app that wraps an SQLite database. I'm
> > wondering what is the best way to call insert(), update(), delete()
> > and query() inside a database transaction. Is it possible? Is there
> > any workaround? bulkInsert() doesn't help since it only makes insert()
> > calls.
>
> > Thanks.

-- 
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