When i call the method:all(),i Get error
public Cursor all()
{
SQLiteDatabase db = this.getReadableDatabase();
Cursor cur = db.rawQuery("select * from Details", null);
return cur;
}
How i call this function????
dh = new DataHandler(this);
cu=dh.all();
byte[] byteArray = cu.getBlob(3);
Bitmap bm = BitmapFactory.decodeByteArray(byteArray, 0 ,byteArray.length);
iv.setImageBitmap(bm);
Error:
i get this error when i try to use cu=dh.all();
12-04 22:47:58.520 28993-28993/com.example.aswin.pricelist E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.aswin.pricelist, PID: 28993
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:275)
Aucun commentaire:
Enregistrer un commentaire