title: Displaying image from the sqlite database using cursor in android
body: <p>i want to display image in imageview from sqlite database using cursor. i used below code to retrieve image but i am not able to display image in imageview.</p>
  
  <pre><code>Cursor c=this.db.query(TABLE_NAME, new String[] { "name","price","image" },
                  null, null, null, null, null);
  name.setText(c.getString(0));
  price.setText(c.getString(1));
  byte b[]=c.getBlob(2);
  Bitmap bp=BitmapFactory.decodeByteArray(b, 0, b.length);
  ImageView image=(ImageView)findViewById(R.id.ImageView);
  //ByteArrayInputStream imageStream = new ByteArrayInputStream(b);               
  //Bitmap theImage = BitmapFactory.decodeStream(imageStream);
  //image.setImageBitmap(theImage);               
  image.setImageBitmap(bp); 
  </code></pre>
  
  <p>other than image, name and price will display but image will not display.
  any suggestion or code that will help me to solve this problem.</p>
  
  <p>Please help me.</p>
  
  <p>Thanks in advance..</p>