- db.execSQL("UPDATE " + ProviderTableMeta.FILE_TABLE_NAME +
- " SET " + ProviderTableMeta.FILE_ACCOUNT_OWNER + " ='" +
- account.name + "' " +
- " WHERE " + ProviderTableMeta.FILE_ACCOUNT_OWNER + " ='" +
- oldAccountName + "' " );
+// db.execSQL("UPDATE " + ProviderTableMeta.FILE_TABLE_NAME +
+// " SET " + ProviderTableMeta.FILE_ACCOUNT_OWNER + " ='" +
+// account.name + "' " +
+// " WHERE " + ProviderTableMeta.FILE_ACCOUNT_OWNER + " ='" +
+// oldAccountName + "' " );
+ ContentValues cv = new ContentValues();
+ cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, account.name);
+ int num = db.update(ProviderTableMeta.FILE_TABLE_NAME,
+ cv,
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?",
+ new String[]{ oldAccountName });