Hi everybody,
Create a content provider that updates a SQLite table with columns
Quantity, Price and Total.
There are other columns but are not important.
I try update the column Total with result multiplication of columns
Price and Quantity but my sorprise was find in column total this
content: "Price * Quantity"
The code that i use its that:
... Others ContentProviderOperation Uptade and Inserts
//This is code
ContentProviderOperation.Builder b =
ContentProviderOperation.newUpdate(OrderLineContract.CONTENT_URI)
.withValue(OrderLineContract.Columns.TOTAL,
OrderLineContract.Columns.PRICE + " * " +
OrderLineContract.Columns.QUANTITY);
operations.add(b.build());
ctx.getContentResolver().applyBatch(OrderContract.AUTHORITY,
operations );
Its posible make this or I'm wrong.
Thanks for their help.
--
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