//MyOpenHelper class
public static final String TABLE_NAME2 = "Catlog_Chield";
db.execSQL("CREATE TABLE IF NOT EXISTS "+TABLE_NAME2+" (_id INTEGER PRIMARY KEY AUTOINCREMENT,log_desc TEXT,log_date TEXT,log_image BLOB,cat_id INTEGER,FOREIGN KEY (cat_id) REFERENCES "+TABLE_NAME1+"(_id))");
//My working class
ByteArrayInputStream inputStream =
new ByteArrayInputStream(c.getBlob(c.getColumnIndex(log_image))); //Here I can't give my column name log_name
Bitmap bp=BitmapFactory.decodeStream(inputStream);
image.setImageBitmap(bp);
質問する
550 次