I have a problem with my Android
project. When I run a delete
on the sqlite
database, I get the following log message as a return:
W/FileUtils: Failed to chmod(/storage/sdcard/Cardapio Digital/Database/dbcardapio.sqlite):
android.system.ErrnoException: chmod failed: EPERM (Operation not permitted)
public class OrdersDao {
Context context;
variaveis v;
SQLiteDatabase db;
public PedidosDao(Context context, variaveis v) {
this.v = v;
this.context = context;
}
public void deletaItem(int codigo){
db = context.openOrCreateDatabase(v.getPathBanco(),Context.MODE_WORLD_WRITEABLE,null);
try{
db.execSQL("DELETE FROM PEDIDOS WHERE ID = "+codigo+" ");
}catch(Exception e){
e.printStackTrace();
}
db.close();
}