1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| maBaseSQLite = new MaBaseSQLite(Informations.this, "bdd", null,1);
bdd = maBaseSQLite.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(MaBaseSQLite.COL_NOM, "d");
values.put(MaBaseSQLite.COL_SOCIETE,"e");
values.put(MaBaseSQLite.COL_DATE, "1/8/5");
values.put(MaBaseSQLite.COL_SEXE, "e");
values.put(MaBaseSQLite.COL_TEL, "7");
values.put(MaBaseSQLite.COL_EMAIL, "oo@oo.ll");
values.put(MaBaseSQLite.COL_MP, "1");
values.put(MaBaseSQLite.COL_LANGUE,"e");
values.put(MaBaseSQLite.COL_MSG, "r");
//on insère l'objet dans la BDD via le ContentValues
if( bdd.insert(MaBaseSQLite.TABLE_UTILISATEUR1, null, values) != -1 ){
Toast.makeText(Informations.this,"insertion" , Toast.LENGTH_LONG).show(); }
bdd.close(); |
Partager