public Cursor getPro()
{
sql=dbhelper.getReadableDatabase();
return db.query("pro", new String[] {jid,username,password},null,null,null,null,null);
}
its my getpro method...and here i'm accessing it.
c=db.getPro();
if(c != null $$ c.moveToFirst())
{
Toast.makeText(getApplicationContext(), "True", Toast.LENGTH_LONG).show();
}
db.close();
i want to check whether table has any data or not but app crashes with nullpointerException
Aucun commentaire:
Enregistrer un commentaire