SQLite table query

Posted by soclose on Stack Overflow See other posts from Stack Overflow or by soclose
Published on 2010-04-19T03:01:00Z Indexed on 2010/04/19 3:03 UTC
Read the original article Hit count: 305

Filed under:
|

Hi

I query the table by using this function below

   public Cursor getTableInfo() throws SQLException 
{            
 return db.query(TableName, null, 
            null, 
            null, 
            null, 
            null, 
            null);
}

I got the error "View Root.handleMessage(Message)line:1704". I could insert the data but can't query the data. I called this function below

      Cursor c = db.getTableInfo();
      int cRow = c.getCount();
      if (cRow == 0)
      {
       Toast.makeText(NewContact.this, 
                "No Record",                 
                Toast.LENGTH_LONG).show();
      }

Please help me.

© Stack Overflow or respective owner

Related posts about android

Related posts about sqlite