1

这是我的代码

    String queryTenants = "select * from tenants";
       String queryProperties = "select * from properties";
       String queryLeases = "select * from leases";
       String queryPayments = "select * from payment_history ";
       String queryCredit = "select * from credit_standing";
       String queryMaster = "select * from sqlite_master";


       Cursor curT=myDataBase.rawQuery(queryTenants,null);
       Cursor curP=myDataBase.rawQuery(queryProperties,null);
       Cursor curL=myDataBase.rawQuery(queryLeases,null);
       Cursor curPa=myDataBase.rawQuery(queryPayments,null);
       Cursor curC=myDataBase.rawQuery(queryCredit,null);
       Cursor curM=myDataBase.rawQuery(queryMaster,null);

       curT.moveToFirst();
       curP.moveToFirst();
       curL.moveToFirst();
       curPa.moveToFirst();
       curC.moveToFirst();
       curM.moveToFirst();curso

       System.out.println("Tenanst" + curT.getCount());
       System.out.println("Properties" + curP.getCount());
       System.out.println("Leases" + curL.getCount());
       System.out.println("Payments"+curPa.getCount());
       System.out.println("Credit"+curC.getCount());
       System.out.println("Master" + curM.getCount());

每个表的每个 cursor.count 返回 0,除了主表。使用 SQLite 浏览器,我可以清楚地看到其他表填充了行和列,但我无法访问它们。请帮忙

4

0 回答 0