db!!.rawQuery("DELETE FROM $Cards_TABLE WHERE $Card_Parent_Board_Id='$CardParnt_boardId' AND $Card_Parent_Swimlane_Id='$CardParnt_SwimlaneId' AND $Card_Parent_List_Id='$CardParnt_ListId' ", null)
this code doesn't work in app but the result string (sql code ) works in sql
The rawQuery
method expects output, that is it returns a Cursor, and should therefore only be used for SELECT queries.
Other queries, such as DELETE, INSERT, DELETE, UPDATE or CREATE queries should instead use the execSQL
method.
It should also be noted that the conveniences methods, such as delete
, insert
and update
not only generate SQL but they also return the a useful value.
insert
returns the rowid of the inserted row as a longmupdate
and delete
methods return the number of affected rows as an int.You may wish to refer to SQLiteDatabase