title: How to delete from SQL Database
body: <p>I am trying to write code to delete a transaction from an SQL database. The function below adds a deposit and another deletes it from the SQL database. When I try running it, it leads to an SQLLiteException from this line:</p>
  
  <pre><code>TransactionDAO.removeTransaction(int, String) line: 154
  
  
  
  
  public void addDeposit(int accountID, String transName, long efDate,
              double amount) {
          ContentValues tran = new ContentValues();
          tran.put(SQLHelper.COLUMN_ACCOUNTID, accountID);
          tran.put(SQLHelper.COLUMN_TRANSNAME, transName);
          tran.put(SQLHelper.COLUMN_ENTEREDTIMESTAMP, Calendar.getInstance()
                  .getTimeInMillis());
          tran.put(SQLHelper.COLUMN_EFFECTIVETIMESTAMP, efDate);
          tran.put(SQLHelper.COLUMN_AMOUNT, amount);
          tran.put(SQLHelper.COLUMN_COMMITTED, 1);
          database.insert(SQLHelper.TABLE_TRANSACTION, transName, tran);
      }
  public void removeTransaction(int accountID, String transName) {
          ContentValues tran = new ContentValues();
          database.delete(SQLHelper.TABLE_TRANSACTION, transName, null);
      }
  </code></pre>
  
  <p>I really have no idea how to solve this problem. Im confused on how to find the exact row in an SQL database. That is probably the reason for the error.</p>