I am new to database i just created a simple database .please let me know how to delete a single row from this data base and how to edit a single row from this database :) thanks in advance
void createDatabase(String time, String day,String course,String room,String syl){
database = openOrCreateDatabase("newDb",MODE_PRIVATE, null);
sql = "CREATE TABLE IF NOT EXISTS examTab (Time VARCHAR ,Day VARCHAR ,Course VARCHAR ,Room VARCHAR ,Syl VARCHAR );";
c = database.rawQuery(sql, null);
database.execSQL(sql);
String insertSql = "INSERT INTO examTab VALUES('"+time+"','"+day+"','"+course+"','"+room+"','"+syl+"');";
database.execSQL(insertSql);
database.close();
}
Aucun commentaire:
Enregistrer un commentaire