tags:

views:

65

answers:

1

Hi, I`am trying to delete a specific row in database. i am deleteing by using this query:

    Uri myUri = Uri.parse("content://com.idan.datastorageprovider/maps");
    this.getContentResolver().delete(myUri, "ROUTE_NAME="+routeName,null);

in my database i have 2 columns: ROUTE_NAME,ROUTE_PATH.

and i want to delete a row by the column ROUTE_NAME, while i give it a value of which row in that column i want to delete. i get no errors, but the row is still there.. what am i doing wrong?

Thanks,

Idan.

A: 

ive found the solution:

String where="ROUTE_NAME" + "=?"; this.getContentResolver().delete(myUri,where, new String[] {nameOfValInColumn});

ray.

rayman