API是这样说的,
Returns
        the number of rows affected if a whereClause is passed in, 0 otherwise. To remove all rows and get a count pass "1" as the whereClause.即返回的是受影响的行数(是符合删除条件的),0 除外(即删除操作失败)。

解决方案 »

  1.   

    db.delete("userinfo", "name=?", new String[] {"hujintao"});
    db.delete一般有三个参数,1--数据库表名
    2----相当于SQL语句中的where部分,也就是描述删除条件,
    我觉得这个可以实现啊,你可以写这么一句
    db.delete("userinfo", "name=?", new String[] {"hujintao"});
    setTitle(“删除成功”);
      

  2.   

    我知道了,是我的Tast语句出错了。
    Toast.makeText(Dele.this,R.string.toast_log_dele_01 + Integer.toString(num) + R.string.toast_log_02,Toast.LENGTH_SHORT).show();我这样写。
    String str=R.string.toast_log_dele_01 +Integer.toString(num) + R.string.toast_log_02;
    System.out.println(str);两个得输出的结果是这样的:213096860102130968602 +号不是连接两个字符串的吗?改成这样:String str=“ddddd”+Integer.toString(num) + R.string.toast_log_02;
    输出是:ddddd02130968602为什么R.string.这样就不行???