I want to save Images in my database but I am not sure of one thing
I have this method on the class that extends SQLiteOpenHelper
public boolean insertDemo(byte[] a, byte[] b, byte[] c, byte d) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues cv = new ContentValues();
cv.put("id", 1);
cv.put("demo1", a);
cv.put("demo2", b);
cv.put("demo3", c);
cv.put("demo4", d);
db.insert("demo_tb", null, cv);
return true;
}
My question is,what should the datatype be? currently I have
db.execSQL("create table demo_tb"+"(id integer primary key,demo1 text,demo2 text,demo3 text,demo4 text)");
in the onCreate method.