Achint
unread,Apr 20, 2011, 5:16:46 AM4/20/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bpgc-android-community
So I want to overwrite the values stored in one of the rows of my
table and I'm executing the following statements :
ContentValues c = new ContentValues();
c.put(GeoPoints.ROUTE, defaultRouteName);
c.put(GeoPoints.GEOPOINTS_LAT, defaultLat);
c.put(GeoPoints.GEOPOINTS_LONG, defaultLon);
try{
referenceUri = getContentResolver().insert(GeoPoints.CONTENT_URI,
c);
Toast.makeText(this, "Record resources allocated",
Toast.LENGTH_LONG).show();
}catch(SQLiteException e){
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG);
}
And later on I'm doing this to update the same record
stringRouteName = routeName.toString();
updateData.put(GeoPoints.ROUTE, stringRouteName);
updateData.put(GeoPoints.GEOPOINTS_LAT, latString);
updateData.put(GeoPoints.GEOPOINTS_LONG, longString);
debugUri = getContentResolver().insert(referenceUri, updateData);
It gives me an unknown Uri exception. Why? I thought the specific
record uri is returned?