try
                {
                    DaoSession session=MyApplication.getInstances().getDaoSession();
                    long fromId=-1;
                    String strSql="select * from test order by ID desc limit 0,1 ";
                    Cursor c  = session.getDatabase().rawQuery(strSql,null);
                    if(c.moveToFirst())
                    {
                        fromId=c.getLong(c.getColumnIndex("ID"));

                    }
                    c.close();
                }
                catch (Exception ex)
                {
                    showToast(ex.getMessage());
                }

 

相关文章:

  • 2022-12-23
  • 2021-08-10
  • 2021-12-08
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2021-05-06
相关资源
相似解决方案