set one image for every id in my database but only got the first row blob !
this is my database.java :
public byte[] getpic(int id){
Cursor cu = mydb.rawQuery("select * from content where ID="+ id,null);
cu.moveToFirst();
byte s[]= cu.getBlob(cu.getColumnIndex("IMAGE"));
return s;
}
in main.java
private void load(String sea, String Name, int page3){
db.open();
byte[] p = db.getpic(page3);
Bitmap bm = BitmapFactory.decodeByteArray(p,0, p.length);
img.setImageBitmap(bm);
db.close();
}
what should i do???
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
problem with blob
Aucun commentaire:
Enregistrer un commentaire