android - What is the use of '_id' in ContentUris.withAppendedId -
i have been struggling update of 1 row in sqlite databasetable.
although provided _id value of row wanted update in contenturis.withappendedid uri, still have check in 'where'-part of update statement whether id of record same.
when leave 'where'-part of update statement 'null', update statement tries update rows of table instead of row id provided.
uris define resource. not define operations can made on resource.
with regards contentprovider (since you've included in tags question), need consider app contentprovider , app wishes access or modify data may not same app. if implementing contentprovider, need recognize uri of kind mentioned , adjust clause accordingly, assuming support operation on resource.
the other use insert operations, typical thing return uri item inserted. e.g. successful insert on uri content://authority/directory return content://authority/directory/_id, _id id of newly inserted row.
Comments
Post a Comment