游标值始终为null android

时间:2015-09-15 04:03:54

标签: android sqlite

查询已成功执行,但curosr在android studio 1.2.1.1中始终为null值。

String selectQuery = "SELECT * from " + StaticData.SCHOOL_TABLE_NAME + " WHERE "
                + "(School_Name LIKE \"%" + Locality1 + "%\") AND"
                + " (City LIKE \"%" + City + "%\" OR Zone LIKE \"%" + City + "%\" ) AND"
                + " State LIKE \"%" + State + "%\" AND"
                + " Country LIKE \"%" + Country + "%\"";
Cursor cursor = database.rawQuery(selectQuery, null);

0 个答案:

没有答案