Example #1
0
  public Boolean UpdateUserInfo(UserInfo user) {
    StringBuilder strSql = new StringBuilder();
    strSql.append("Update " + WeiBoSqliteOpenHelper.tbl_UserInfo);
    strSql.append(" Set uid=" + user.getUid().toString());
    strSql.append(",name='" + user.getName() + "'");
    strSql.append(",nick='" + user.getNick() + "'");
    strSql.append(",sex=" + user.getSex().toString());

    _db.execSQL(strSql.toString());

    return true;
  }
Example #2
0
  /*
   * @see weibocon.org.database.IWeiBoDB#AddUser(weibocon.org.data.UserInfo)
   */
  public Boolean AddUser(UserInfo user) {
    StringBuilder strSql = new StringBuilder();
    strSql.append("Insert Into ");
    strSql.append(WeiBoSqliteOpenHelper.tbl_UserInfo);
    strSql.append("(uid,name,nick,sex,head,weibotype)");
    strSql.append(" Values(\r\n");
    strSql.append(user.getUid().toString());
    strSql.append("," + user.getName());
    strSql.append("," + user.getNick());
    strSql.append("," + user.getSex().toString());
    strSql.append("," + user.getHead());
    strSql.append("," + user.getWeiboType().toString());
    strSql.append(")");

    _db.execSQL(strSql.toString());
    return true;
  }