Delete row in database table given one column value - which is a string
<p>I have a table with column headings: | _id (long) | Name (String) | x (integer) | y (integer) |</p>

<p>I want to delete the row in the table that has Name myName.</p>

<pre><code>// In onCreate
dbHelper = new DBAdapter(this);
dbHelper.open()

// Function in DBAdapter class
public boolean deleteTitleGivenName(String myName) 
{
    return dbHelper.delete(DATABASE_TABLE_2, KEY_NAME + "=" + myName, null) &gt; 0;
}

// Function call in java code
dbHelper.deleteTitleGivenName(myName);  // this is where my code fails  

dbHelper.close();           
</code></pre>

<p>Just as a note: myName is for sure in the database. Also, I can not use the ROWID since I am getting myName from a ListView.</p>

<p>I just started programming with Android and I have tried for days to solve this problem.
Is my WHERE clause correct (KEY_NAME + "=" + myName)?</p>

<p>Thanks in advance.</p>
