title: SQLite only one column get updated Android
body: <p>I have a Sqlite database that works fine, I can insert rows with no problem, but when I try to do an update only one column get updated. I get a return value of 1, but only the column SCANNED get updated, that is the only column that already had a value of 0 and was change to 1.</p>
  
  <pre><code>public int UpdateScanInvoice(String Invoice, int scanned, String empname, 
                int empnum) {
          Calendar c = Calendar.getInstance();
          SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd",Locale.US);
          String formattedDate = df.format(c.getTime());
          SimpleDateFormat tf = new SimpleDateFormat("hh:mm:ss",Locale.US);
          String formattedTime = tf.format(c.getTime());
          String strFilter = MySQLiteHelper.TICKETNR + "='" + Invoice +"'";
          ContentValues scanvalues = new ContentValues();
              scanvalues.put(MySQLiteHelper.LOADEMPNAME, empname);
          scanvalues.put(MySQLiteHelper.SCANNED, scanned);
          scanvalues.put(MySQLiteHelper.LOADEMPNUM, empnum);
          scanvalues.put(MySQLiteHelper.LOADDATE,formattedDate);
          scanvalues.put(MySQLiteHelper.LOADTIME, formattedTime);
          SQLiteDatabase db = dbHelper.getWritableDatabase();
          int rowUpdated = db.update(MySQLiteHelper.TABLE_INVOICE, scanvalues,strFilter, null);
          return rowUpdated;
      }
  </code></pre>
  
  <p>Maybe my original insert is wrong?
  This is the original insert.</p>
  
  <pre><code>values.put(MySQLiteHelper.SCANNED, 0);
  values.put(MySQLiteHelper.LOADDATE, "");
  values.put(MySQLiteHelper.LOADTIME, "");
  values.put(MySQLiteHelper.LOADEMPNAME, "");
  values.put(MySQLiteHelper.LOADEMPNUM, "");
  </code></pre>
  
  <p>I the file has 19 columns and only the last 4 will not update or take any value when I do an insert.
  I deleted the data recreated the database, same result.</p>
  
  <p>Thanks,
  KimHJ</p>